jcvandan
jcvandan

Reputation: 14314

Can someone explain difference in security credentials when using Visual Studio development server VS. IIS

Can anyone answer this question?

I have just switched to using IIS on an application I am working on and I am now running into problems with my database. I am using sqlexpress and entity framework and now I have switched to using IIS my application is being refused permission to drop/create my db.

Upvotes: 0

Views: 123

Answers (2)

Mark 909
Mark 909

Reputation: 1835

Visual Development server will be running under the context of the logged in user, which will probably have administrator access.

IIS will be running under the context of the AppPool which will be default probably be set to NetworkService. You need to grant appropriate access to the local Network Service account in SQL Server to give it permission to drop and recreate databases.

Upvotes: 2

leppie
leppie

Reputation: 117220

Your app pool is likely under NETWORKSERVICE.

Just give rights to your DB for this account.

Or change the app pool account.

Upvotes: 1

Related Questions