Problem with SQL Server connection string - provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

Hi Guys,

I am having a wierd problem. The system works perfectly when I am connected to the local network but throws the above error when I disconnect it from the network. Given below are my connectionstrings:

integrated security=false;user id=U1;data source=localhost;persist security info=False;password=pwd1;initial catalog=MyDB //connection string to my database

Data Source=localhost;Initial Catalog=aspnetdb;User ID=U2;Password=pwd2 //connectionstring to aspnetdb for webparts

I have also changed all the providers (SQLMembership, SQLProfile, SQLRole) to use LocalSQLServer and commented the connectionstring in machine .config.

This works pretty well when I am connected to the network but fails if I disconnect.

Any help in this regard is greatly appreciated.

Best Regards,

Please choose "Mark as Answer" for the post that leads you to a solution
8/26/2008 11:50:03 AM 93655 articles. 6 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 0

I think the solution suggested in this post should address your issue.


8/26/2008 1:12:24 PM

Thanks for your suggestion. Eventhough this did not help me I learnt something new from your post Smile....One of my team mate had messed up the code by hardcoding the connectionstring in the class file instead of getting it from the web.config.

Fixed that and it got corrected.


Best Regards,

Please choose "Mark as Answer" for the post that leads you to a solution
8/26/2008 1:57:05 PM

hello! ok men try whit. 

 "Data Source=;Initial Catalog=;Persist Security Info=True;User ID=sa;Password=" providerName="System.Data.SqlClient"


but you insert IP server no name, server. or see you configuration the SQL server.

8/26/2008 9:51:41 PM

Similar Artilces:

Connection string for default instance of SQL Server 2005, on a box also running a named instance of SQL Server 2000
The box I am trying to connect to is running two instances of SQL Server. There is a SQL Server 2005 instance which is the default. There is a SQL Server 2000 instance which is named 'SQLSERVER'.  I can connect to the SQL Server 2000 instance no problem:<add key="ConnectionString" value="server=MYPC\SQLSERVER;database=mydatabase;user id=****;password=****" /> However,  I am having trouble connecting to the Default SQL Server 2005 instance. I have tried: <add key="ConnectionString" value="server=MYPC;database=mydatabase;user i...

How to specify connection string for a SQL Server on a separate firewalled computer than the web server?
I am in a complex situation and I need to implement the following for my employer as soon as possible. Any feedback on this would be greatly appreciated.The company wants to have a separate firewalled computer for SQL Server that is going to be used by their ASP.Net application. The IP address ( say: )of this separate computer is known. Also, the port number on which SQL Server listens is known ( say: 221).  If the userid and password are 'sa' and 'sun21170' then what will the connection string look like for this situation? So in this situation SQL Server would ...

2008 IIS7 connection to SQL Server 2000 on Web Server 2000: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
I am setting up a windows 2008 IIS7 web server, and trying to connect to a windows 2000 sql server 2000 database. I have an IIS6 Windows 2000 web server activately connected just fine. I have anonymous and windows authentication enabled. And in my web.config I have identity impersonate="true" My sql server 2000 typically uses the IISUSER anonymous user set up in IIS6 on my original windows 2000 web server. But this new IIS7 is giving me grief. I can't seem to setup the IUSR or IISUSER or anything in it. I can't even use sql server credentials in my connection string altho...

This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers
When I connect SQL Server 2005 to a remote database i get the error: "This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers". Can I confirm it is because: the remote db is of SQL Server 2008? There is a soln mentioned in Did anybody try this (installing 2008 express: I am just checking again, whether it will disturb my existing SQL Server installation, in any means...? Though it is mentioned that it will g...

SQL Server 2005 Installation problems with SQL Server Express & SQL Server 2000
Hi Guys, I have had SQL Server Express and Sql Server Management Studio Express installed on my machine for some time and recently tried to install a trial of SQL Server 2005 as well.  (Yes, I'm migrating from Visual Studio Express to Visual Studio Professional, just as in tended!) Everything went fine except that nothing seemed to be installed.  I searched in all the obvious places - both on the Start/Programs menu and on the hard-drive: nothing. A check under Add/Remove Programs showed that Sql Server 2005 Express was installed, but called SQL Server 2005. So after a number o...

connection string to remote server with second instance of SQL Server
I need to connect to a remote server with a second instance of SQL Server installed on it.  In the past I have been able to connect to other databases using the IP address in the Data Source.  Example:   Any ideas on what the connection string needs to find the second instance? Data Source=999.99.9.999,1433; That same server has a second instance of SQL Server installed with db I am trying to connect to.  Using the IP address is not finding it.  I tried different versions the following:  Data Source=999.99.9.999\SQLTwo,1433; &nbs...

A Problem to Connect SQL Server 2000 Through MSS MS SQL Server 6.x Interaface
Hi, We have two SQL Server 2000 database servers. I have no problem to connect serverA through MSS MS SQL Server 6.X. But I cannot connect to serverB through MSS MS SQL Server 6.X. I tried to connect to serverB through ODBC. It is connected well, but there was error message said "Catalog tables could not be created and are not available for use." My PowerBuilder version is 7.0.2 and build 8046. Mindy ...

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Hello All, I'm Getting the following error when calling a dll from my application. [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. The dll was written in vb6 and accesses a sql db using the following connection string. Public Const GLOBAL_DNS As String = "DSN=TransSrvFinal;UID=sa;PWD=admin;" This DLL works fine when called from other Windows Apps. However I'm now trying to call this dll from with in an application. I'm using as the codebehind. I'm a...

Is a SQL Server Device CAL enough if SQL Server is being accessed by only one web server?
 In my application scenario, there is a single web server hosting my ASP.Net application. If I buy a 'single device CAL'  for SQL Server database, will that be ok in this situation since only one device (i.e. the machine hosting the IIS web server) is going to access the SQL Server database?sun21170 No, that won't be enough.  -- "Mark As Answer" if my reply helped you --...

Problem datetime when transferring local SQL Server to Web Hosting SQL Server using XML Webservice
Dear all, We have recently integrated our internal timetracking (TT) system (Windows forms based )so that it can retrieve info from our (web based) bug tracking (BT) system. The BTS SQL Server is hosted in the USA on a shared server, the TT SQL server is stationed at our office in Phnom Penh, Cambodia. During development we tested the XML webservice that handles the actual datatransfer between the two systems and everything works fine. After deployment of the XML webservice to the live environment (hosted service in USA) problems showed up: DateTime values arrive malformed. Examples:...

Connection pool problem when separate SQL Server 2000 and IIS Web server to each machine.
I have ASP.NET application and connect to SQL Server 2000 using connection pool.My application work find if Web Server and SQL server stay in same machine (Connection can reach to max pool size value that I defined).When I seperate SQL Server to other machine (simply like 2 tiers architecture), I got problem , my application can not create connection to max pool size value Have something that I should do if I seperate Web and SQL server?Regards,   P.S This is my connection string Persist Security Info=False; Initial Catalog=CustomerDB; Data Source=Server01; Conn...

Connecting to SQL Server from Web Server
This is probably a very basic question, but I'm not sure how to go about doing this.  If I have a SQL server on our LAN and our Web server (running Microsoft Web Server OS) in my DMZ, and I want my Web server in the DMZ to be able to connect to the SQL server on the LAN, how do I go about doing that?  Do I use an ODBC connection?  I can't use SQL client tools because the Web Server OS will not allow me to install it.  Any help would be great.  Thanks in advance. Ryan   Do you have it hooked up in your web.config file?   <connecti...

.net 1 .. connection string problem with sql server 2005 SP2
Hi All,  I have a prpblem that drivnig me mad... I have some old projects in .net 1 that I am having to move the databases. At the moment the webistes and database are on the same server. I have now moved the database but the connectionn string in the webconfig no longer works. I am using the following connection string.  <add key="ConnectionString"  value="  Server=xx.xx.xx.xx; Network=DBMSSOCN; Database=xxxxxxx; Uid=xx; Pwd=xxxxxxxx;"/>  When the website resides on the same server the connection string works but when they are on d...

SQL Server 2000 and SQL Server 2005 in the same server
Can enyone please send me a link to a white paper explaining how to run both SQL Server 2000 and 2005 in the same machine?Thanks. I don't know about the white paper but I had both running on my machine for a while by making the SQL 2000 a named instance. So for SQL 2005 connection strings my server name was (local) while for SQL 200 using the named instance it was (local)\joesql where joesql was the instance nameHope it helps,Joe http://www.joeaudette.com

Connecting to SQL Server 2000 with SQL Server 2005
I currently have Enterprise 2000 installed but would like to uninstall and install SQL Server 2005. Are there any problems if I try to reconnect to other SQL 2000 servers or other serious issues I need to consider before doing this change ?   Thanks,...

Web resources about - Problem with SQL Server connection string - provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified -

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video -
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Kings Cross identities arrested in connection with murder
Two Kings Cross identities&nbsp;have been arrested in connection with the murder of a man at Sydney hotel.

Governor declares state of emergency in connection with California methane leak
... of Emergency Services) On Wednesday evening, California Governor Jerry Brown declared a state of emergency in Los Angeles County in connection ...

Tons Of Methane Are Spewing Out Of California, And There’s A Connection To The Governor
The out of control leak has forced thousands of residents to flee their homes. Gov. Brown's sister is a paid board member at the company that ...

Report: Man arrested in connection with Ashley Olsen's murder
Italian media agency reports that a non-EU male has been arrested in the murder of the 35-year-old American

Toyota and Kymeta rely on satellites to power this Mirai's data connection
They're hoping to achieve gigabit wireless speeds within the next few years.

Test Claims To Show T-Mobile’s YouTube “Optimization” Is Just Connection Throttling
... on the same network, and at the same time of day. They tested video streaming against three other kinds of downloads and measured the connection ...

Resources last updated: 1/15/2016 7:13:16 PM