Login failed for user 'Tester'. Reason: Not associated with a trusted SQL Server connection.

“/DgCRM”应用程序中的服务器错误。
--------------------------------------------------------------------------------

Login failed for user 'Tester'. Reason: Not associated with a trusted SQL Server connection. 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.Data.SqlClient.SqlException: Login failed for user 'dgcrmer'. Reason: Not associated with a trusted SQL Server connection.

源错误: 


行 40:             sqlConnection = new SqlConnection(connectionString);
行 41:             sqlCommand = new SqlCommand(strSql, sqlConnection);
行 42:             sqlConnection.Open();
行 43:             obj = sqlCommand.ExecuteScalar();
行 44:             sqlConnection.Close();
 

源文件: d:DgCRMApp_CodeBaseBase.cs    行: 42 

堆栈跟踪: 


[SqlException (0x80131904): Login failed for user 'dgcrmer'. Reason: Not associated with a trusted SQL Server connection.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800131
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +172
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +357
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +494
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   Insus.NET.Base.ExecuteScalar(String strSql) in d:DgCRMApp_CodeBaseBase.cs:42
   Insus.NET.BusinessBase.ExecuteScalar(String strSql) in d:DgCRMApp_CodeBaseBusinessBase.cs:38
   Insus.NET.SystemParameter.GetParameterValueByPk(String strId) in d:DgCRMApp_CodeBackSystemParameter.cs:41
   Insus.NET.InsusBase.get_ApplicationName() in d:DgCRMApp_CodeBaseInsusBase.cs:62
   Insus.NET.InsusBase.Head(HtmlControl htmlCtrl, String strPageTitle) in d:DgCRMApp_CodeBaseInsusBase.cs:35
   Insus.NET.InsusBase.HeadContent(HtmlControl htmlCtrl, String strPageTitle) in d:DgCRMApp_CodeBaseInsusBase.cs:30
   Index.Page_Load(Object sender, EventArgs e) in d:DgCRMIndex.aspx.cs:19
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

 


--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.1434; ASP.NET 版本:2.0.50727.1434 

 出现这错误,往往是没有把ms SqlServer的Security选项卡的Authentication的作出正确的选择:

而引致的错误.

### 回答1: 在这个代码中出现的syntax error是指语法错误。具体地,在__tester__.java文件的第62行出现了一个语法错误。错误的具体描述是:“cannot find symbol”,表示找不到符号。而这个符号是“resize”。所以,代码在这个地方无法识别和找到resize这个方法或变量。 要解决这个问题,我们需要查看代码并确定是什么缺少了resize这个符号。首先,我们需要验证resize是否是一个方法还是一个变量。如果resize是一个方法,我们需要查找resize的定义部分,并确保它正确地被声明和实现。如果resize是一个变量,我们需要检查是否有一个与之对应的变量声明和初始化。 另外,我们还需要考虑resize这个符号是否属于当前作用域。在Java中,每个变量和方法都有其作用域,表示可以访问和使用这些变量和方法的代码块。如果resize的定义不在当前作用域内,那么我们需要引入并初始化resize所属的对象。 总之,syntax error: cannot find symbol错误通常是由于无法找到符号(变量或方法)的定义而引起的。我们需要检查代码,找出缺少resize符号的原因,并采取正确的措施来解决这个问题。 ### 回答2: 在给出的代码中,出现了语法错误。错误的位置发生在__tester__.java文件的第62行。 错误消息"cannot find symbol"表示找不到符号。具体来说,在第62行中使用了一个resize方法,但是该方法没有定义或声明过。因此,编译器无法找到resize方法所属的符号。 要解决这个错误,您需要确认resize方法是否存在,并且确保在使用之前已经正确定义和实现了该方法。如果resize方法是在其他文件中定义的,您需要确保正确地导入该文件。另外,也需要检查resize方法的参数和返回类型,以确保它们与调用处的期望一致。 总之,根据给出的错误信息来看,首先应当检查resize方法的存在性、定义性和导入性。如果这个方法确实不存在或者定义有误,需要进行相应的修复。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值