在线上发生以下错误可能是错误..提前谢谢 [英] On online the following error has been occured what may the error..Thanks in advance

查看:73
本文介绍了在线上发生以下错误可能是错误..提前谢谢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)



描述:执行期间发生未处理的异常当前的网络请求。请查看堆栈跟踪以获取有关错误及其源自代码的更多信息。


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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

推荐答案

您好,请看下面的链接& ;一些步骤:



建立与SQL Server的连接时发生与网络相关或特定于实例的错误。找不到服务器或无法访问服务器。 [ ^ ]



以下是解决查询的一些要点:



当您的应用程序没有足够的权限访问数据库时,Sql Server会触发此错误。这个错误有几个原因。要修复此错误,您应该按照以下说明操作。



尝试使用management studio从服务器连接sql server。如果您使用Windows身份验证连接sql server然后将您的应用程序池标识设置为服务器管理员。



如果您使用sql server身份验证然后检查web.config中的连接字符串您的Web应用程序和设置用户ID和密码的sql server允许您登录。<​​br />


如果你的数据库在其他服务器(访问远程数据库)然后第一个从sql server管理工作室启用sql server sql server属性的远程访问,并启用TCP / IP表单sql server配置管理器。



完成所有这些操作后你仍然无法访问数据库然后检查服务器表单的防火墙,你试图访问数据库并在防火墙中添加一个规则以启用sql server的端口(默认情况下sql server使用1433,检查你需要检查的sql server端口sql server配置管理器网络协议TCP / IP端口)。
Hi, please see this link below & some steps too:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible.[^]

Here are some points to solve your query :

Sql Server fire this error when your application don't have enough rights to access the database. there are several reason about this error . To fix this error you should follow the following instruction.

Try to connect sql server from your server using management studio . if you use windows authentication to connect sql server then set your application pool identity to server administrator .

if you use sql server authentication then check you connection string in web.config of your web application and set user id and password of sql server which allows you to log in .

if your database in other server(access remote database) then first of enable remote access of sql server form sql server property from sql server management studio and enable TCP/IP form sql server configuration manager .

after doing all these stuff and you still can't access the database then check firewall of server form where you are trying to access the database and add one rule in firewall to enable port of sql server(by default sql server use 1433 , to check port of sql server you need to check sql server configuration manager network protocol TCP/IP port).


这篇关于在线上发生以下错误可能是错误..提前谢谢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆