私はasp.netとIISを初めて使用し、学習にasp.netを使用してWebサイトを開発しています。最初にvwdを使用して新しい空のWebサイトを作成し、物理ディレクトリはC:\ inetpub \ web1ですが、後でweb1をC:\ inetpub \ wwwrootに移動してIISを開き、ディレクトリをアプリケーションに向けて、ブラウザエラーメッセージが発生し、
Server Error in '/web1' Application.
Cannot open database "testdb" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open database "testdb" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.
Source Error:
Line 34:
Line 35: SqlConnection dbCon = new SqlConnection(ConfigurationManager.ConnectionStrings["testConnectionString"].ConnectionString);
Line 36: dbCon.Open();
Line 37:
Source File: c:\inetpub\wwwroot\web1\App_Code\tree.cs Line: 36
Stack Trace:
[SqlException (0x80131904): Cannot open database "test" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1270
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
System.Data.SqlClient.SqlConnection.Open() +125
Node.buildTree(String contentType, String mode) in c:\inetpub\wwwroot\web1\App_Code\tree.cs:36
header.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\web1\header.aspx.cs:14
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
誰もが問題が何であるか知っていますか?
ありがとう