Asp.net 用户的Sql异常登录失败

Asp.net 用户的Sql异常登录失败,asp.net,.net,sql-server,sqlexception,Asp.net,.net,Sql Server,Sqlexception,我有一个应用程序和一个WCF服务,它是该应用程序的一部分。如果我直接调用该服务,会发生什么情况?它会导致以下异常: System.Web.Services.Protocols.SoapException:服务器无法处理请求。-->System.Data.SqlClient.SqlException:用户“Kanix”登录失败。\u000a位于System.Data.SqlClient.SqlInternalConnection.OneError(SqlException异常,布尔断开连接,操作1

我有一个应用程序和一个WCF服务,它是该应用程序的一部分。如果我直接调用该服务,会发生什么情况?它会导致以下异常:

System.Web.Services.Protocols.SoapException:服务器无法处理请求。-->System.Data.SqlClient.SqlException:用户“Kanix”登录失败。\u000a位于System.Data.SqlClient.SqlInternalConnection.OneError(SqlException异常,布尔断开连接,操作
1 wrapCloseInAction)\位于System.Data.SqlClient.TdsParser.ThroweException和Warning(TdsParserStateObject StateObjectStateObj、布尔调用方连接锁、布尔异步关闭)的u000a位于System.Data.SqlClient.TdsParser.TryRun的u000a(RunBehavior RunBehavior、SqlCommand cmdHandler、SqlDataReader数据流、BulkCopySimpleResultSet bulkCopyHandler、TdsParserStateObject stateObj、Boolean和dataReady)\u000a位于System.Data.SqlClient.TdsParser.Run(RunBehavior RunBehavior,SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject StateObjectObjectObj)\u000a位于System.Data.SqlClient.SqlInternalConnectionDs.CompleteLogin(布尔登记确定)\u000a位于System.Data.SqlClient.SqlInternalConnectionDs.AttemptOneLogin(ServerInfo ServerInfo、String newPassword、SecureString newSecurePassword、Boolean IgnoresInOpenTimeout、TimeoutTimer timeout、Boolean withFailover)\u000a位于System.Data.SqlClient.SqlInternalConnectionDS.LoginOfAirver(ServerInfo ServerInfo、String newPassword、SecureString newSecurePassword、Boolean redirectedUserInstance、SqlConnectionString connectionOptions、SqlCredential凭证、TimeoutTimer timeout)\u000a位于System.Data.SqlClient.sqlinternalconnectionds.OpenLoginEnlist(TimeoutTimer timeout、SqlConnectionString connectionOptions、SqlCredential credential、String newPassword、SecureString newSecurePassword、Boolean redirectedUserInstance)\u000a位于System.Data.SqlClient.SqlInternalConnectionDS(DbConnectionPoolIdentity标识、SqlConnectionString连接选项、SqlCredential凭据、对象提供程序信息、字符串新密码、SecureString newSecurePassword、布尔重定向声明、SqlConnectionString用户连接选项、SessionData重新连接SessionData)\u000a位于System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions选项、DbConnectionPoolKey poolKey、Object poolGroupProviderInfo、DbConnectionPool池、DbConnectionOwningConnection、DbConnectionOptions用户选项)u000a位于System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(位于System.Data.ProviderBase.DbConnectionPool.CreateObject的DbConnection池池、DbConnectionOwningObject、DbConnectionOptions选项、DbConnectionPoolKey、DbConnectionOptions用户选项)\u000a(DbConnection owningObject、DbConnectionOptions用户选项、DbConnectionInternal oldConnection)\u000a位于System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject、DbConnectionOptions userOptions、DbConnectionInternal oldConnection)\u000a位于System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,UInt32 waitForMultipleObjectsTimeout,Boolean allowCreate,Boolean onlyOneCheckConnection,DbConnectionOptions userOptions,DbConnectionInternal&connection)\u000a位于System.Data.ProviderBase.DbConnectionPool.TryGetConnection(数据库连接所有者对象,任务完成源
1重试,数据库连接选项用户选项,数据库连接内部和连接)\u000a位于System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(数据库连接所有者连接,任务完成源代码
1重试,数据库连接选项用户选项,数据库连接内部旧连接,数据库连接内部&连接)\u000a位于System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection、DbConnectionFactory connectionFactory、TaskCompletionSource
1重试,DbConnectionOptions用户选项)\u000a位于System.Data.SqlClient.SqlConnection.TryOpenner(TaskCompletionSource
1重试)\u000a位于System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource
1重试)\u000a位于System.Data.SqlClient.SqlConnection.Open()\u000a位于DataAccessLayer.SQLHelper.GetMultipleResultSets(字符串strSQlSPName,Dictionary
2¶ms,List
1 outParams),位于D:\TFS SAAS\HighriseLicensing-\DataAccessLayer\SQLHelper.vb:DataAccessLayer.LoginDL.AuthenticateKey的第162\u000a行D:\TFS SAAS\HighriseLicensing-\DataAccessLayer\LoginDL.vb中的(字符串键,Int32 guid,字符串用户ID,Int32模式):在D:\TFS SAAS\HighriseLicensing-\BusinessLogicLayer\LoginBL.vb中的BusinessLogicLayer.LoginBL.AuthenticateKey中的第20\u000a行(字符串键,Int32 guid,字符串用户ID,Int32模式):在Lincensing.GetFaith.CheckKeyvalidity中的第18\u000a行D:\TFS SAAS\HighriseLicensing-\Lincensing\GetFaith.asmx.vb中的(字符串键,Int32 guid,字符串安装ID,Int32模式):D:\TFS SAAS\HighriseLicensing-\Lincensing\GetFaith.asmx.vb中Lincensing.GetFaith.GetFaith.CheckKey中的第53\u000a行(字符串键,Int32 guid,字符串安装ID,Int32模式),D:\TFS SAAS\HighriseLicensing-\Lincensing\GetFaith.asmx.vb:23\u000a-内部异常堆栈


重要的一点是,当我从应用程序登录时,此服务工作正常,但如果我从应用程序注销,则会出现此错误。

看起来您在登录方面有问题。请直接从sql server management studio或使用相同凭据连接服务器。凭据无效