issue on production database connection

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jan 2009
Posts: 13
Reputation: virang_21 is an unknown quantity at this point 
Solved Threads: 0
virang_21 virang_21 is offline Offline
Newbie Poster

issue on production database connection

 
0
  #1
Jun 12th, 2009
Hi,

I have hosted a website that has MSSQL Server 2005 database on different machine. I am using the following connection string

  1. <add name="ConnectionString" connectionString="Server=mssql2005.ableos.com.au;Database=visualinventory_ableos_com_au;Uid=myuserid;Pwd=mypassword;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />

I am getting the following error.

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)

What may be the potential problem. ?

I am able to connect to the same database using same user id and password through third party software that allows me to monitor it. why my website is not able to connect to it ?

Any suggestion appreciated.
Last edited by peter_budo; Jun 12th, 2009 at 12:20 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 124
Reputation: thewebhostingdi has a little shameless behaviour in the past 
Solved Threads: 11
thewebhostingdi thewebhostingdi is offline Offline
Junior Poster

Re: issue on production database connection

 
0
  #2
Jun 12th, 2009
This should resolve the problem.

Visual Studio => Tools => Options => Database Tools => Design Time - Validation Database => Connection options

Set the sql server instance name to Blank. Please check if this works.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,355
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 604
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: issue on production database connection

 
0
  #3
Jun 12th, 2009
Your connection string has a problem.. If you are using Integrated Security=True then you should not specify a user name and password.

Also I think "uid=" is only valid for an MSSQL connection string if you are using the ODBC driver. I don't think it is valid for Native SQL Client?

Set the connection string as:
  1. <add name="ConnStr" connectionString="Data Source=apex2006sql;Initial Catalog=Bugs;Integrated Security=False;User Id=?username?;Password=?password?;" providerName="System.Data.SqlClient" />
or
  1. <add name="ConnStr" connectionString="Data Source=apex2006sql;Initial Catalog=Bugs;Integrated Security=True;" providerName="System.Data.SqlClient" />
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 225
Reputation: mail2saion is an unknown quantity at this point 
Solved Threads: 34
mail2saion's Avatar
mail2saion mail2saion is offline Offline
Posting Whiz in Training

Re: issue on production database connection

 
0
  #4
Jun 15th, 2009
Yes i think the above poster is right. Also check that Sql server configuraton allows remote connection. To do that follow the steps below:

Click Start -->> Programs -->> Microsoft SQL Server 2005 -->>
Configuration Tools -->> SQL Server Surface Area Configuration.
Now click Surface Area Configuration for Services and Connections.
Now expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.

Restart MSSQLSERVER service from
Start -->> Control Panel -->> Administrative Tools -->>
Service -->> Select MSSQL Server -->> Restart Service
MARK AS SOLVED if its help you.

REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 13
Reputation: virang_21 is an unknown quantity at this point 
Solved Threads: 0
virang_21 virang_21 is offline Offline
Newbie Poster

Re: issue on production database connection

 
0
  #5
Jun 15th, 2009
Thankx for your suggestion.

It resolve the issue with both IIS and SQL Server 2005 on same machine.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,355
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 604
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: issue on production database connection

 
0
  #6
Jun 15th, 2009
Great, I'm glad to see you got it working!

Please mark this thread as solved if we have answered your question.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 7
Reputation: smithroy9 is an unknown quantity at this point 
Solved Threads: 1
smithroy9 smithroy9 is offline Offline
Newbie Poster

Re: issue on production database connection

 
0
  #7
Jun 19th, 2009
Thanks for posting an informatics code about database connections.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC