Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ASP.net中的SQLException 0x80131904。网站可以';无法连接到SQL Server,错误40_Asp.net_Sql Server_Iis_Network Programming_Dotnetnuke - Fatal编程技术网

ASP.net中的SQLException 0x80131904。网站可以';无法连接到SQL Server,错误40

ASP.net中的SQLException 0x80131904。网站可以';无法连接到SQL Server,错误40,asp.net,sql-server,iis,network-programming,dotnetnuke,Asp.net,Sql Server,Iis,Network Programming,Dotnetnuke,因此,今天我公司的ASP.net网站(基于旧的DotNetNuke框架构建)出现了一个错误,上面说: 建立与SQL Server的连接时发生与网络相关或特定于实例的错误。找不到服务器或无法访问服务器。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。(提供程序:命名管道提供程序,错误:40-无法打开到SQL Server的连接) 下面列出了这个堆栈: [SqlException (0x80131904): A network-related or instance-speci

因此,今天我公司的ASP.net网站(基于旧的DotNetNuke框架构建)出现了一个错误,上面说:

建立与SQL Server的连接时发生与网络相关或特定于实例的错误。找不到服务器或无法访问服务器。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。(提供程序:命名管道提供程序,错误:40-无法打开到SQL Server的连接)

下面列出了这个堆栈:

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +428
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) +233
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) +343
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) +175
Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) +45
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) +207
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.Data.SqlDataProvider.GetLogTypeConfigInfo() +71
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfo() +101
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfoByKey(String LogTypeKey, String LogTypePortalID) +65
DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.AddLog(LogInfo objLogInfo) +75
DotNetNuke.Services.Log.EventLog.LogController.AddLog(LogInfo objLogInfo) +175

我最近不得不关闭这个网站,我只是把文件移到硬盘的另一个部分。当我把它们搬回去时,我得到了这个。它正在连接回我们拥有的一个单独的服务器,但是在连接的某个地方有一个阻塞。这两台机器都能相互ping,所以我猜这是服务器级别的东西?堆栈对我来说非常模糊,因此我不知道在哪里查找错误。想法?

我将从以下几点开始

查看DNN是否提供有关连接错误的任何其他详细信息


检查web.config连接字符串。您是否将IIS设置为使用动态帐户作为应用程序池的所有者?web.config连接字符串中的登录信息仍然有效吗?

1。您是否能够使用sql server management studio或从应用程序服务器使用odbcad32.exe连接到数据库?2.确保在具有sql server的计算机上—sql server代理服务正在运行—尝试停止sql server配置服务以启动。