.net - Problem attaching to a sql server express db file using network service account -


I am using VS2010 beta 2 to create an IIS hosted WCF service. I am a simple data store I use a SQL Server database file to use and interact with it to generate some LINQ SQL class.

The problem occurs when I try to connect to Linq to SQL database. I get the following error:

Make database permission denied in database 'master' file c: \ source An attempt to attach an auto-enrolled database to the \ SampleApp \ App_Data \ GameData.mdf file failed. A database exists with the same name, or the specified file can not be opened, or it is located on the UNC share.

To get the previous issue I already have web.config user frequency:

    

My first response is that the user account of the application pool (networker service) is unable to open the file, so I have given complete control over the database file and the log file but this does not help

Interestingly, if I change the application pool to run under the local system then everything works correctly, is there something else that lets me get the Networks Service Do you have to do?

Yopu should use SQL Management Studio Express and add network service account as a login Assign DBO permissions to the specified database or just give it a sceadmin roll. Note that when you install SQL Server 2005, you have the initial option for setting up the login account for services. If you specify the network service by default, the network service account will be given the codeminal role.

Hope this helps


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -