I recently deployed a .Net 4 WCF Data Service hosted on IIS 6, within a corporate environment (intranet), using Entity Framework. I access the service using OData and have been successful retrieving data from tables hosted on SQL Server 2005.
The issue is that I am unable to insert new rows. What I’ve done so far is to set entity rights to ALL -> ie.
config.SetEntitySetAccessRule("*", EntitySetRights.All);
I’m using integrated security on IIS. When I do a POST using jQuery, it returns 500 error code. I’m able to insert rows to a local database in my development environment.
Thanks
I figured it out. I was receiving error
This was caused because the table, although having an identity field, didn’t specify it as a Primary Key. Set the Primary key and all is well.
Fixing the System.Data.UpdateException – DefiningQuery and no Error helped.
Thanks