SQL网络接口,错误:26 [英] SQL Network Interfaces, error: 26

查看:158
本文介绍了SQL网络接口,错误:26的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我下载了个人网站入门套件,当我运行它时,我得到了

错误,如下所示。

我找到了办法使用启动表面区域配置应该

来修复远程设置但我尝试了它仍然得到错误。


我没有SQL Server 2005安装(以为我做了一次)。我确实安装了SQL

Server 2008.


我在代码中没有看到引用SQL Server 2005的地方。


我不是必须在代码中告诉我要使用SQL Server 2008吗?

假设我在我的机器上都有这两种情况吗?

我是否有一些注册表项没有从2005年到

2008版本过时?


感谢您的帮助。


建立与服务器的连接时发生错误。当

连接到SQL Server 2005时,这种失败可能是由于SQL Server不允许远程连接的默认设置下的
这一事实。

(提供者:SQL网络接口,错误:26 - 错误定位

指定的服务器/实例)

描述:执行

当前的网络请求。请查看堆栈跟踪以获取更多信息

关于错误及其在代码中的起源。


异常详细信息:System.Data.SqlClient.SqlException:建立与服务器的连接时发生错误

。当连接到SQL

Server 2005时,这种失败可能是由于在默认的

设置下SQL Server不允许远程连接。 (提供者:SQL

网络接口,错误:26 - 错误查找指定的服务器/实例)


源错误:


第194行:使用命令As New SqlCommand(" GetNonEmptyAlbums",connection)

第195行:command.CommandType = CommandType.StoredProcedure

第196行:连接。打开()

第197行:Dim list As New Generic.List(Of Album)()

第198行:使用reader As SqlDataReader = command.ExecuteReader


源文件:I:\ MyDocuments \ Visual Studio

推荐答案

你好AAaron123,


检查web.config,其中应该是connectionstring ;属性,其中

他们指定连接的位置

这个可以在代码中某处


---

WBR,

Michael Nemtsev [微软MVP] ::博客: http://spaces.live.com/laflour


我们大多数人面临的最大危险并不是我们的目标太高而且我们/>
想念它,但它太低了我们达到了它 (c)米开朗基罗

AI下载了个人网站入门套件,当我运行它时,我得到了

Athe

下面显示的错误。

AI找到了一种使用启动表面区域配置的方法

Asupposed

Ato修复远程设置但我尝试了它仍然得到错误。

AI没有安装SQL Server 2005(我以为曾经做过一次)。我这么做了。
安装Ahave SQL Server 2008.

A>

我在代码中没有看到SQL Server 2005所引用的任何地方。

A>

我不必在代码中告诉我要使用SQL Server 2008吗?

ASuppose I hade在我的机器上?

A>

ADo我有一些注册表项没有从2005年开始过时

到2008版本?

A>

感谢任何帮助。

A>

建立连接时出现AAn错误到服务器。

AWhen

连接到SQL Server 2005,这个失败可能是由于事实造成的。

Athat

Aunder默认设置SQL Server不允许远程

Aconnections。

A(提供者:SQL网络接口,错误:26 - 错误定位

AServer / Instance Specified)

ADescription:在执行
$ b $期间发生未处理的异常b Athe

当前的网络请求。请查看堆栈跟踪以获取更多信息

Ainformation

了解错误及其在代码中的起源。

AException详细信息:System.Data。 SqlClient.SqlException:在建立与服务器的连接时发生错误

。当

连接到SQL Server 2005时,这个故障可能是由于事实造成的。

在默认设置下,SQL Server不允许远程

Aconnections。 (提供者:SQL网络接口,错误:26 - 错误

指定服务器/实例)

A>

ASource错误:

A>

ALine 194:使用命令As New SqlCommand(" GetNonEmptyAlbums",

Aconnection)

ALine 195: command.CommandType = CommandType.StoredProcedure

ALine 196:connection.Open()

ALine 197:Dim list As New Generic.List(Of Album)()

ALINE 198:使用reader As SqlDataReader = command.ExecuteReader

ASource文件:I:\ MyDocuments \ Visual Studio
A>
Hello AAaron123,

Check the web.config, where should be the "connectionstring" attribute, where
they specify where to connect
of this can be somewhere in code

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
AI downloaded the personal website starter kit and when I run it I get
Athe
Aerror shown below.
AI found a way of using Launch Surface Area Configuration that is
Asupposed
Ato fix the remote setting but I tried it and still get the error.
AI do not have SQL Server 2005 installed (thought I did once). I do
Ahave SQL Server 2008 installed.
A>
AI don''t see anywhere in the code where SQL Server 2005 is referenced.
A>
ADon''t I have to tell in the code that I want to use SQL Server 2008?
ASuppose I hade both on my machine?
A>
ADo I have some registry entry that did not get up dated from the 2005
Ato the 2008 versions?
A>
AThanks for any help.
A>
AAn error has occurred while establishing a connection to the server.
AWhen
Aconnecting to SQL Server 2005, this failure may be caused by the fact
Athat
Aunder the default settings SQL Server does not allow remote
Aconnections.
A(provider: SQL Network Interfaces, error: 26 - Error Locating
AServer/Instance Specified)
ADescription: An unhandled exception occurred during the execution of
Athe
Acurrent web request. Please review the stack trace for more
Ainformation
Aabout the error and where it originated in the code.
AException Details: System.Data.SqlClient.SqlException: An error has
Aoccurred while establishing a connection to the server. When
Aconnecting to SQL Server 2005, this failure may be caused by the fact
Athat under the default settings SQL Server does not allow remote
Aconnections. (provider: SQL Network Interfaces, error: 26 - Error
ALocating Server/Instance Specified)
A>
ASource Error:
A>
ALine 194: Using command As New SqlCommand("GetNonEmptyAlbums",
Aconnection)
ALine 195: command.CommandType = CommandType.StoredProcedure
ALine 196: connection.Open()
ALine 197: Dim list As New Generic.List(Of Album)()
ALine 198: Using reader As SqlDataReader = command.ExecuteReader
ASource File: I:\MyDocuments\Visual Studio
A2008\WebSites\PersonalWebSite1\App_Code\PhotoMana ger.vb Line: 196
A>


我确实安装了SQL Server 2005.

我之前安装了SQL Server 2008 Express。


我下载了个人网站入门套件,当我运行它时,我收到了

错误下面。


我是使用启动表面区域配置的方式

来修复远程设置但我尝试了它仍然得到错误。


我不喜欢请参阅代码中引用SQL Server 2005的任何地方。


我不必在代码中告诉我要使用SQL Server 2005吗?

假设我在我的机器上有多种版本?


我是否有一些注册表项没有从2008年起来的

express

到2005版本?


感谢您的帮助。


建立连接时发生错误服务器。当

连接到SQL Server 2005时,这种失败可能是由于SQL Server不允许远程连接的默认设置下的
这一事实。

(提供者:SQL网络接口,错误:26 - 错误定位

指定的服务器/实例)

描述:执行

当前的网络请求。请查看堆栈跟踪以获取更多信息

关于错误及其在代码中的起源。


异常详细信息:System.Data.SqlClient.SqlException:建立与服务器的连接时出现错误



。当连接到SQL

Server 2005时,这种失败可能是由于在默认的

设置下SQL Server不允许远程连接。 (提供者:SQL

网络接口,错误:26 - 错误查找指定的服务器/实例)


源错误:


第194行:使用命令As New SqlCommand(" GetNonEmptyAlbums",connection)

第195行:command.CommandType = CommandType.StoredProcedure

第196行:连接。打开()

第197行:Dim list As New Generic.List(Of Album)()

第198行:使用reader As SqlDataReader = command.ExecuteReader


源文件:I:\ MyDocuments \ Visual Studio

I do have SQL Server 2005 installed.
I previously had SQL Server 2008 Express installed.

I downloaded the personal website starter kit and when I run it I get the
error shown below.

I found a way of using Launch Surface Area Configuration that is supposed
to fix the remote setting but I tried it and still get the error.

I don''t see anywhere in the code where SQL Server 2005 is referenced.

Don''t I have to tell in the code that I want to use SQL Server 2005?
Suppose I hade mutilple versions on my machine?

Do I have some registry entry that did not get up dated from the 2008
express
to the 2005 versions?

Thanks for any help.

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

Source Error:

Line 194: Using command As New SqlCommand("GetNonEmptyAlbums", connection)
Line 195: command.CommandType = CommandType.StoredProcedure
Line 196: connection.Open()
Line 197: Dim list As New Generic.List(Of Album)()
Line 198: Using reader As SqlDataReader = command.ExecuteReader

Source File: I:\MyDocuments\Visual Studio
2008\WebSites\PersonalWebSite1\App_Code\PhotoManag er.vb Line: 196



错误意味着连接字符串中指定的sqlserver未找到
。如果你有sqlserver 2005& 2008年,2008年可能不是

默认实例。要么指定实例,要么创建一个新的默认

实例(重新安装sqlserver 2008)


- 布鲁斯(sqlwork.com)

" AAaron123"写道:
the error means the sqlserver specified in the connection string was not
found. if you had both sqlserver 2005 & 2008, the 2008 is probably not the
default instance. either specify the instance, or create a new default
instance (reinstall sqlserver 2008)

-- bruce (sqlwork.com)
"AAaron123" wrote:

>

我下载了个人网站入门套件,当我运行它时,我得到了

错误如下所示。

我找到了一种使用启动表面区域配置的方法,它可以用来修复远程设置,但我尝试了它仍然得到错误。


我没有安装SQL Server 2005(以为我曾经做过一次)。我确实安装了SQL

Server 2008.


我在代码中没有看到引用SQL Server 2005的地方。


我不是必须在代码中告诉我要使用SQL Server 2008吗?

假设我在我的机器上都有这两种情况吗?

我是否有一些注册表项没有从2005年到

2008版本过时?


感谢您的帮助。


建立与服务器的连接时发生错误。当

连接到SQL Server 2005时,这种失败可能是由于SQL Server不允许远程连接的默认设置下的
这一事实。

(提供者:SQL网络接口,错误:26 - 错误定位

指定的服务器/实例)

描述:执行

当前的网络请求。请查看堆栈跟踪以获取更多信息

关于错误及其在代码中的起源。


异常详细信息:System.Data.SqlClient.SqlException:建立与服务器的连接时发生错误

。当连接到SQL

Server 2005时,这种失败可能是由于在默认的

设置下SQL Server不允许远程连接。 (提供者:SQL

网络接口,错误:26 - 错误查找指定的服务器/实例)


源错误:


第194行:使用命令As New SqlCommand(" GetNonEmptyAlbums",connection)

第195行:command.CommandType = CommandType.StoredProcedure

第196行:连接。打开()

第197行:Dim list As New Generic.List(Of Album)()

第198行:使用reader As SqlDataReader = command.ExecuteReader


源文件:I:\ MyDocuments \ Visual Studio


这篇关于SQL网络接口,错误:26的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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