设为首页 - 加入收藏
您的当前位置:主页 > 数据库 > SQL > 正文

A network-related or instance-specific error occurred while

来源:未知 点击数: 时间:2018-04-10
 
Server Error in '/' Application.
 
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) 
  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: 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)
 
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): 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.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +6277328
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
   System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity) +6291690
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +180
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +6292078
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +6291993
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +352
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +831
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +49
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +6293798
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +78
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1922
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +89
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6296622
   System.Data.SqlClient.SqlConnection.Open() +300
   Game.Kernel.DbHelper.OdjCGjhTVTFvnp2VSy(Object ) +20
   Game.Kernel.DbHelper.ExecuteDataset(CommandType commandType, String commandText, DbParameter[] commandParameters) +269
   Game.Kernel.DbHelper.RunProc(String procName, List`1 prams, DataSet& ds) +115
   Game.Kernel.MessageHelper.GetMessageForObject(DbHelper database, String procName, List`1 prams) +58
   Game.Data.PlatformManagerDataProvider.UserLogon(Base_Users user) +194
   Game.Facade.PlatformManagerFacade.CgiQIn3AylXsJKxGeHL(Object , Object ) +20
   Game.Facade.PlatformManagerFacade.UserLogon(Base_Users user) +109
   Game.Web.Login.cXnBsTvumDCuQJ1sCST(Object , Object ) +12
   Game.Web.Login.btnLogin_Click(Object sender, EventArgs e) +293
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
 
  

A network-related or instance-specific error occurred while

看到这张图片,我先自己试了下,确实是有这个问题的,而且不是偶然性的,那么再看报错意思,在跟sql建立连接的时候发生了一个错误。

我首先检查了配置文件有没有被改过,发现没有;我就在本地调试,发现本地不存在这个问题,于是我又看了下相关的代码文件有没有被改过,还是没有;那么是哪里出了问题呢?我只好上远程看看有没有什么限制远程访问

之类的东西,也没有;既然提到了远程连接,那我就把配置文件的sql连接地址改成 local 试下,一改,发现可以了,但是问题的原因还没找到,还要继续;又问了同事上午有没有动过服务器,说没有,那好,我就看看资源管

理器看看吧,是不是有什么垃圾程序在搞鬼,没有发现什么异常的程序,又看了资源监视器,发现有这么个东西

A network-related or instance-specific error occurred while

哇,开了1837条线程,这是什么鬼啊!!!,先不纠结这个,看看是不是它弄到服务器访问不了远程地址先,把它挂起,配置文件一改回去,发现正常了,ok ,问题就是它了,好一通百度、谷歌下来,说这个程序是跟数据

库备份有关的,杀不死的小强,把它服务关了,执行程序删了,只要你一开备份,它又复活了,这尼玛不就是病毒吗,暂时没找到解决它的办法,只好就这样挂着它了,反正服务器是实体机,内存够用

 


上一篇:没有了
下一篇:没有了

相关文章:

相关推荐:

栏目分类

A3站长网 站长网 站长网技术网 站长教程网 织梦CMS教程 织梦模板 帝国CMS模板 联系QQ:26991496 邮箱:26991496@qq.com

A3站长网:欢迎您!谢谢您的访问...

Top