FieldAccessException in the InsertOnSubmit RRS feed

  • Question

  • Hi,


    I have a data driven ASP.NET application which hosts Silverlight 2.0 controls. This ASP.NET forms call a WCF service, which in turn use LINQ for SQL to update to the database.


    When we host the web application on VS.NET server, it works fine. However, when we host the web application  in IIS,  we get a 'FieldAccessException' in the 'InsertOnSubmit' method. It points to the first private variable in the LINQ generated class.


    What does hosting in IIS have to do with FieldAccessException ? Any ideas will be helpful.




    Wednesday, December 3, 2008 6:57 AM

All replies

  • It depends on the permissions granted the code by the server (IIS).  The server has to be set up to grant the code a new type of permission (new since VS2008) called RestrictedMemberAccess.  Many servers give code full permissions, some are set up to give only limited permissions.

    Thursday, December 4, 2008 4:01 PM