首页 新闻 会员 周边 捐助

C#.NET数据库查询异常,帮忙看下

0
[待解决问题]

[code=text]
Event code: 3005
Event message: 发生了未经处理的异常。 (UnhandledException)
Event time: 2017/11/10 8:31:59
Event time (UTC): 2017/11/10 0:31:59
Event ID: 41301518159443a0a924a53995c56eb3
Event sequence: 136210
Event occurrence: 12231
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/ROOT-1-131547081197816320
Trust level: Full
Application Virtual Path: /
Application Path: C:\web\XXX\
Machine name: XXX

Process information:
Process ID: 5524
Process name: w3wp.exe
Account name: XXX\XXX

Exception information:
Exception type: ArgumentNullException
Exception message: 值不能为 null。(value can not be null)
参数名: value (argument name)
在 System.String.EndsWith(String value, StringComparison comparisonType)
在 System.Data.Common.ADP.IsAzureSqlServerEndpoint(String dataSource)
在 System.Data.ProviderBase.DbConnectionPool.IsBlockingPeriodEnabled()
在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.Open()
在 XXX.Tzh.SQLHelper.ExecuteNonQuery(CommandType commandType, String commandText, SqlParameter[] commandParameters)
在 XXX.STS.Portal.SSO.Jump.SaveJumpLog(String userId, String timeStr, String redirectUrl)
在 XXX.STS.Portal.SSO.Jump.ProcessRequest(HttpContext context)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)



Request information:
Request URL: http://XXX/SSO/XXX.ashx?url=urn://XXX/Home/HomeToGzf_Auto?ProjectID=2017C201&ClassId=56FD6647-F2B6-40E4-A5E7-54FDF5569F47
Request path: /SSO/Jump.ashx
User host address: 10.63.30.39
User: 770121
Is authenticated: True
Authentication Type: Forms
Thread account name: XXX\XXX

Thread information:
Thread ID: 245
Thread account name: XXX\XXX
Is impersonating: False
Stack trace: 在 System.String.EndsWith(String value, StringComparison comparisonType)
在 System.Data.Common.ADP.IsAzureSqlServerEndpoint(String dataSource)
在 System.Data.ProviderBase.DbConnectionPool.IsBlockingPeriodEnabled()
在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.Open()
在 XXX.XXX.SQLHelper.ExecuteNonQuery(CommandType commandType, String commandText, SqlParameter[] commandParameters)
在 XXX.STS.Portal.SSO.Jump.SaveJumpLog(String userId, String timeStr, String redirectUrl)
在 XXX.STS.Portal.SSO.Jump.ProcessRequest(HttpContext context)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Custom event details:
[/code]

今天我的网站不能执行SQL查询,看到以上异常,把服务器重启后又恢复正常了,有人给看下是什么原因么

smileruner的主页 smileruner | 菜鸟二级 | 园豆:204
提问于:2017-11-10 14:33
< >
分享
所有回答(1)
0

System.String.EndsWith(String value, StringComparison comparisonType)

应该是这一句出的问题。value传入null值了

龙葛格 | 园豆:782 (小虾三级) | 2017-11-12 12:43

从异常返回的信息看,这一段并不是我执行的,我只是做了一个System.Data.SqlClient.SqlConnection.Open()操作。

支持(0) 反对(0) smileruner | 园豆:204 (菜鸟二级) | 2017-11-12 14:25

@smileruner: 检查一下连接字符串有没有问题吧

支持(0) 反对(0) 龙葛格 | 园豆:782 (小虾三级) | 2017-11-12 14:28

@龙葛格: 没有,网站一直很正常,偶发这种情况,重启服务器就好了。

支持(0) 反对(0) smileruner | 园豆:204 (菜鸟二级) | 2017-11-16 10:55
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册