0

私が直面しているいくつかの同様の問題を見ると、私は少し異なる問題を抱えています。私の接続文字列は

Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\inetpub\wwwroot\aspnet_new\App_Data\database.mdf;Integrated Security=True;Connect Timeout=30" providerName="System.Data.SqlClient"

私のアプリケーションは.NetFramework4.0で実行されており、マネージパイプラインモードはクラシックであり、IDはApplicationPoolIdentityです。

The website is running perfectly but when I open visual studio and expand my database to add/edit tables, then the moment visual studio establishes connection with database, the IIS stops working and shows me this error.

Cannot open database "database.mdf" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\general

So I close connection in my visual studio and refresh the same page in my browser and website runs again. I want website to run concurrently when my database is accessed in visual studio to add/edit tables.

I am not using SQL Server Management Studio. Please help me to solve this problem.

4

1 に答える 1

1

アプリケーション プール ID を次のように変更してみてください。Network Service

于 2013-02-05T11:03:39.470 に答える