943,641 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 917
  • ASP.NET RSS
Jun 12th, 2009
0

issue on production database connection

Expand Post »
Hi,

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

ASP.NET Syntax (Toggle Plain Text)
  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.
Similar Threads
Reputation Points: 10
Solved Threads: 2
Light Poster
virang_21 is offline Offline
29 posts
since Jan 2009
Jun 12th, 2009
0

Re: issue on production database connection

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.
Reputation Points: 3
Solved Threads: 14
Junior Poster
thewebhostingdi is offline Offline
168 posts
since Jun 2009
Jun 12th, 2009
0

Re: issue on production database connection

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:
ASP.NET Syntax (Toggle Plain Text)
  1. <add name="ConnStr" connectionString="Data Source=apex2006sql;Initial Catalog=Bugs;Integrated Security=False;User Id=?username?;Password=?password?;" providerName="System.Data.SqlClient" />
or
ASP.NET Syntax (Toggle Plain Text)
  1. <add name="ConnStr" connectionString="Data Source=apex2006sql;Initial Catalog=Bugs;Integrated Security=True;" providerName="System.Data.SqlClient" />
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Jun 15th, 2009
0

Re: issue on production database connection

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
Reputation Points: 26
Solved Threads: 44
Posting Whiz in Training
mail2saion is offline Offline
247 posts
since Apr 2009
Jun 15th, 2009
0

Re: issue on production database connection

Thankx for your suggestion.

It resolve the issue with both IIS and SQL Server 2005 on same machine.
Reputation Points: 10
Solved Threads: 2
Light Poster
virang_21 is offline Offline
29 posts
since Jan 2009
Jun 15th, 2009
0

Re: issue on production database connection

Great, I'm glad to see you got it working!

Please mark this thread as solved if we have answered your question.
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Jun 19th, 2009
0

Re: issue on production database connection

Thanks for posting an informatics code about database connections.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
smithroy9 is offline Offline
7 posts
since Jun 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: unable to start the virtual machine
Next Thread in ASP.NET Forum Timeline: Login page button(visual basic)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC