asp.net配置错误 [英] asp.net configuration error

查看:90
本文介绍了asp.net配置错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我刚刚购买了一个新的托管空间.
当我尝试连接到本地主机上的数据库时,它工作正常.
但是当我在服务器上上传该时间时,发生了一个错误,如下所述.
然后我上传的数据库是"App_code"文件夹中的"aspnetdb.mdf"文件.

我的配置字符串是:"

Hello,
I have just purchased one new hosting space.
when i try to connection to database at local host it''s working properly.
but when i upload on server that time one error is occurred as i mention below.
and i upload my database is "aspnetdb.mdf" file in "App_code" Folder.

my configuration string is: "

<add name="conn" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"/>"

Error is: 

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)



请帮助我如何将表格连接到数据库.

谢谢,



Please help me how can i connection form to database.

Thanks,

推荐答案

查找指定的服务器/实例时出错
看起来您的连接字符串不正确或服务器不可访问.
首先,要确保SQL Server服务正在运行.其他原因可能是错误的连接字符串或某些防火墙阻塞.

在这里,请查看此博客文章以解决问题:异常-错误26-错误定位了指定的服务器实例 [ ^ ]
提供程序:SQL网络接口,错误:26-错误定位服务器/实例... [ ^ ]
未找到指定的SQL Server" o .. [^ ]
Error Locating Server/Instance Specified
Looks your connection string is incorrect or the server is not accessible.
First and foremost make sure that the SQL Server services are running. Other reasons could be, incorrect connection string or some Firewall blockage.

Here, have a look at this blog post to troubleshoot the issue : MSDN Blogs: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified[^]

If needed, look at these one:
Exception - error 26 - Error Locating Server Instance Specified[^]
provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance...[^]
"Specified SQL server not found" o..[^]


是否已使用SQLEXPRESS Instanace安装Sql Server Express Edition ...并选中Fire wall SQL SERVER PORT 1433,则必须在服务器端启用端口.
并检查SQL SERVER实例和服务是否正在运行.


Vijay
did u install Sql server Express Edition with SQLEXPRESS Instanace... and check Fire wall SQL SERVER PORT 1433 you must enable port in server side.
and check SQL SERVER Instance and service running or not.


Vijay


这篇关于asp.net配置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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