Server Error in '/' Application.具体是什么问题 急急

hwlinux 2008-10-07 12:39:34
以下是错误代码


Server Error in '/' Application.
--------------------------------------------------------------------------------

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
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: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734979
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
SqlServerTask.SQLHelper.PrepareCommand(SqlCommand cmd, SqlConnection conn, CommandType cmdType, String cmdText, SqlParameter[] cmdParms) +33
SqlServerTask.SQLHelper.ExecuteReader(String connString, CommandType cmdType, String cmdText, SqlParameter[] cmdParms) +111
SqlServerTask.MobileInfoTask.getInfo(String Code) +134
InterService.MobileInfoService.getInfo(String Mobile) +68
reg.Receive.accessAccount(String Mobile, String Message) +37
reg.Receive.Page_Load(Object sender, EventArgs e) +181
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061


...全文
795 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
hwlinux 2008-10-07
  • 打赏
  • 举报
回复
那这个就是数据库的问题呢?

很权限有没有关系
wanghao2979 2008-10-07
  • 打赏
  • 举报
回复
error: 40 - Could not open a connection to SQL Server


连不上数据库

个人认为
fangsp 2008-10-07
  • 打赏
  • 举报
回复
帮忙顶一个
期待高手的到来
bag_19830321 2008-10-07
  • 打赏
  • 举报
回复
session的时间问题
设长一点
hwlinux 2008-10-07
  • 打赏
  • 举报
回复
事件类型: 警告
事件来源: ASP.NET 2.0.50727.0
事件种类: Web Event
事件 ID: 1309
日期: 2008-10-7
事件: 14:29:52
用户: N/A
计算机: DGTW
描述:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2008-10-7 14:29:52
Event time (UTC): 2008-10-7 6:29:52
Event ID: 4b8e047042b14e2b977d0b6bbd94108b
Event sequence: 66
Event occurrence: 5
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/410469400/Root-1-128678122693960000
Trust level: Full
Application Virtual Path: /
Application Path: D:\wwwroot\regSetup20071226\
Machine name: DGTW

Process information:
Process ID: 5188
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: SqlException
Exception message: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Request information:
Request URL: http://221.122.65.11/Receive.aspx
Request path: /Receive.aspx
User host address: 59.61.168.89
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at SqlServerTask.SQLHelper.PrepareCommand(SqlCommand cmd, SqlConnection conn, CommandType cmdType, String cmdText, SqlParameter[] cmdParms)
at SqlServerTask.SQLHelper.ExecuteReader(String connString, CommandType cmdType, String cmdText, SqlParameter[] cmdParms)
at SqlServerTask.MobileInfoTask.getInfo(String Code)
at InterService.MobileInfoService.getInfo(String Mobile)
at reg.Receive.accessAccount(String Mobile, String Message)
at reg.Receive.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Custom event details:

有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。
]




这个是事件日志~~~~~




帮帮忙~~~~~~~~~~~~~~~~
hwlinux 2008-10-07
  • 打赏
  • 举报
回复
那具体问题出在哪了 DX
tautaulee 2008-10-07
  • 打赏
  • 举报
回复
就是数据库 连接的问题。
我晕。
hwlinux 2008-10-07
  • 打赏
  • 举报
回复
<customErrors mode="Off" /> 这个已经是OFF了,错误信息就是上面的内容

数据库连接失败,字符串有错---->有时候会出错,有时候不会.是这个问题吗?

ASP.NET版本是2.0的---->赐教了
tautaulee 2008-10-07
  • 打赏
  • 举报
回复
有可能是你发布到iis上 asp.net版本的问题。
你在iis上看看是不是2.0的。
bobui 2008-10-07
  • 打赏
  • 举报
回复
改成sql验证。
周公 2008-10-07
  • 打赏
  • 举报
回复
数据库问题。
可能数据库连接字符串不正确。
可能数据库服务没有启动。
可能不允许远程连接。
  • 打赏
  • 举报
回复
有可能是你的数据库服务器还未启动
gzMysky 2008-10-07
  • 打赏
  • 举报
回复
连接数据库失败

在 Web.Config 中设置
<customErrors mode="Off"/>

看看详细情况
hwlinux 2008-10-07
  • 打赏
  • 举报
回复
网站有ASP的也有ASPX。ASP没问题。就ASPX一直出现这个问题。。。有时候又不会
effun 2008-10-07
  • 打赏
  • 举报
回复

检查数据库连接字符串是否正确。

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧