IIS Permissions / LINQ EF Query RRS feed

  • Question

  • I am hosting my ADO.NET Data service on Windows 2008/IIS 7. All requests on the web site/virtual directory use Windows Authentication. Impersonation is enabled and I have client code (Windows Forms Clients) sucessfully reading and writing SQL Server 2008 tables from LINQ to EF queries with code to handle credentials.

    We started using LINQ EF UpdateObject to update tables. We now fail with "Request Error".  One of my associates suggested to enable IIS Write permissions for the users that are using the database on the Data Services web site and the Virtual Dir that hosts the data service. I thought he was crazy. We are connected to a database server, not trying to write files into an IIS folder!!! However I did it, and it worked! 

    I noticed with SQL Profiler that LINQ was converting UpdateObject into an "EXEC sp_executesql N'update....." query! The only way the request for this query is NOT rejected is if we give the authenticated user WRITE PERMISSIONS to files in the IIS Virt Dir.

    Can someone explain just what is going on here?
    Thursday, October 8, 2009 8:40 PM


All replies