SQL防爆preSS连接字符串地狱ASP.Net [英] SQL Express connection string hell ASP.Net

查看:192
本文介绍了SQL防爆preSS连接字符串地狱ASP.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQL防爆preSS 2005年是在本地运行。我有在同一台机器上运行的另一个人写的一个项目。所有我想要做的是连接到它,不能那么难吧?

SQL Express 2005 is running locally. I have a project written by another person running on the same machine. All I want to do is connect to it, can't be that hard right?

这是一个我在我的旧传统的ASP code用来打在同一实例中运行的另一个数据库:

This is the one I use in my old classic ASP code to hit another database running on the same instance:

提供程序= SQLOLEDB;数据源= MYLAPTOP \\ MSSMLBIZ;坚持安全信息= TRUE;用户ID =为TestUser;密码= letmein;初始目录= TESTDB

Provider=SQLOLEDB;Data Source=MYLAPTOP\MSSMLBIZ;Persist Security Info=True;User ID=TestUser;Password=letmein;Initial Catalog=TestDB

但尝试的一个版本,使.NET code抛出摇摆因为他使用SQLServer的驱动程序,因此它不喜欢的东西提供写它。

But trying a version of that makes the .net code throw a wobbler as he's written it using SQLServer drivers so its not liking the Provider stuff.

下面是他的code中的原单连接字符串:

Here is the orginal connection string from his code:

服务器=(本地);初始目录= TheDatabase;用户ID = TheUser;密码= ThePassword;

Server=(local);Initial Catalog=TheDatabase;User Id=TheUser;Password=ThePassword;

我去过 http://www.connectionstrings.com/sql-server-2005 并尝试了从那里,这些都得到SQL Server不存在或拒绝访问的选项(多么可爱的混合错误消息!):

I've been to http://www.connectionstrings.com/sql-server-2005 and tried several of the options from there, these all get "SQL Server does not exist or access denied" (what a lovely mixed error message that is!):


  • 数据源=本地主机;集成安全性= TRUE;初始目录= TheDatabase

  • 数据源=本地主机\\ SQLEX $ P $干燥综合征;集成安全性= TRUE;初始目录= TheDatabase

  • 数据源= MyLaptop \\ SQLEX $ P $干燥综合征;集成安全性= TRUE;初始目录= TheDatabase

  • 服务器= MyLaptop \\ SQLEX $ P $干燥综合征;初始目录= TheDatabase;用户ID = TheUser;密码= ThePassword;

我已经为MyLaptop / IUSR_MyLaptop,MyLaptop / ASPNET,MyLaptop / IWAM_MyLaptop登录在SQL防爆preSS,并给予他们所有的读/写权限我的数据库并设置其默认数据库是TheDatabase。

I've created logins for MyLaptop/IUSR_MyLaptop, MyLaptop/ASPNET, MyLaptop/IWAM_MyLaptop in SQL Express and given them all read/write permissions to my DB and set their default DB to be TheDatabase.

到底我是什么做错了,我怎么能调试问题多一些?

What the heck am I doing wrong and how can I debug the problem some more?

更新:特别感谢Chris对他所有的指针,到底到了那里,如果你有类似的问题,请阅读所有的评论有很多的环节和技巧上如何跟踪下来

UPDATE: Special Thanks to Chris for all his pointers, got there in the end, if you are having similar problem please read all the comments there are lots of links and tips on how to track them down.

推荐答案

使用您的评论是错误信息,你应该通过<一个项目运行href=\"http://blogs.msdn.com/sql%5Fprotocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx\" rel=\"nofollow\">http://blogs.msdn.com/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx

With that error message in your comment you should run through the items in http://blogs.msdn.com/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx

我presume的实例正在运行,并允许通过TCPIP连接?

I presume the instance is running and does allow connections over tcpip?

这篇关于SQL防爆preSS连接字符串地狱ASP.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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