无法打开登录请求的数据库“aspnetdb”。登录失败。用户'IIS APPPOOL \ default'登录失败

时间:2013-07-30 12:41:15

标签: asp.net iis-7.5 aspnetdb

  

[SqlException(0x80131904):无法打开登录请求的数据库“aspnetdb”。登录失败。用户'IIS APPPOOL \ default'登录失败。] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException异常,Boolean breakConnection,Action'1 wrapCloseInAction)+6676046 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj,Boolean callerHasConnectionLock ,Boolean asyncClose)+810 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior,SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject stateObj,Boolean& dataReady)+4403 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject stateObj)+84 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)+55 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo,String newPassword,SecureString newSecurePassword,Boolean ignoreSniOpenTimeout ,TimeoutTimer timeo ut,Boolean withFailover)+368 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo,String newPassword,SecureString newSecurePassword,Boolean redirectedUserInstance,SqlConnectionString connectionOptions,SqlCredential credential,TimeoutTimer timeout)+6704814 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist( TimeoutTimer timeout,SqlConnectionString connectionOptions,SqlCredential credential,String newPassword,SecureString newSecurePassword,Boolean redirectedUserInstance)+6705315 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity,SqlConnectionString connectionOptions,SqlCredential credential,Object providerInfo,String newPassword,SecureString newSecurePassword,Boolean redirectedUserInstance,SqlConnectionString userConnectionOptions)+610 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions选项,DbConnectionPoolKey poolKey,Object poolGroupProviderInfo,DbConn ectionPool pool,DbConnection owningConnection,DbConnectionOptions userOptions)+1049 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool,DbConnectionOptions options,DbConnectionPoolKey poolKey,DbConnectionOptions userOptions)+74 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions userOptions)+6707883 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions)+78 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,UInt32 waitForMultipleObjectsTimeout,Boolean allowCreate,Boolean onlyOneCheckConnection,DbConnectionOptions userOptions,DbConnectionInternal&连接)+2192 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,TaskCompletionSource'1 retry,DbConnectionOptions userOptions,DbConnectionInternal& connection)+116 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection,TaskCompletionSource'1 retry,DbConnectionOptions userOptions,DbConnectionInternal& connection)+1012 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource'1 retry,DbConnectionOptions userOptions)+6712511 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource'1 retry)+ 152 System.Data.SqlClient.SqlConnection.Open()+229 System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context,Boolean revertImpersonate)+150 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString,Boolean revertImpersonation)+4876314 System.Web.Security.SqlRoleProvider.GetUs ersInRole(String roleName)+1440 System.Web.Security.Roles.GetUsersInRole(String roleName)+335 mykladr.SiteMaster.Page_Init(Object sender,EventArgs e)+499 System.Web.UI.Control.InitRecursive(Control namingContainer)+ 186 System.Web.UI.Control.InitRecursive(Control namingContainer)+421 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)+2098

我在web.config中的连接字符串是:

<add name="aspnetdbConnectionString" connectionString="Data Source=kit-pc\;Initial Catalog=aspnetdb;Integrated Security=True"
  providerName="System.Data.SqlClient" />

我对这个问题感到困惑,但是我看到了一些话题,我找不到答案。

0 个答案:

没有答案