views:

29

answers:

1

Hello,

In my mvc asp.net application, I have various modules in that I have insert and edit functionality .

Some time I am getting this error:

at System.Data.EntityClient.EntityTransaction.Commit() at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options) at System.Data.Objects.ObjectContext.SaveChanges() at admin.chambal.com.Controllers.DocsController.Edit(Int32 id, FormCollection collection) in .............

When i Run the applcation from my local server and perform edit operation withsame data I never got that exception. But when I am using remote server, I get this error so many time.(not always).

The exception is generatedwhile saving the changes.

objEntities.SaveChanges();

Is that problem is relted to database?

Thanks Aayushi Soni

A: 

Yes, it comes from the DB (or provider). Look at the nested exception for details.

Craig Stuntz
How can I see, it is not producing from my local database. This error is generated at when I run the application on browser from production.
Aayushi Soni
You could use an error logging framework like ELMAH to capture the exception.
Craig Stuntz