any_student_2007


Respectde Friends,

My aspx page is trying to connect to a remote server with SQL Server 2000 installed on it, the ip of the server is 172.16.3.111 and the same is the instance of SQL Server, sql server is running in SQL Server Authentication mode, user id is "test" and password is "test123", name of database is myDB,the connection string which I am providing is as follows:

"data source=172.16.3.111\172.16.3.111;user id=test;password=test123;initial catalog=myDB;"

But I am getting the following exception:

SQL Server does not exist or access denied.

even if I try the following connection string:

"data source=172.16.3.111;user id=test;password=test123;initial catalog=myDB;"

than also I get the same exception

even if provide the following connection strings:

"SERVER=172.16.3.111;UID=test;PWD=test123;DATABASE =myDB;"

"SERVER=172.16.3.111\172.16.3.111;UID=test;PWD=test123;DATABASE =myDB;"

than also I get the same exceptions

At last I tryed with the combination of ip address and sql server instance name in the datasource but still getting the same exceptions.

Can u please tell whats the problem,is the connection string correct,the DBA has also registered me "test" as a user on the SQL server.One thing which I want to mention is that through enterprise manager I can connect and use sql server without any problems,also please note that in VS.NET when I try connecting using server explorer and test the connection than I connect successfully, than why is problem occuring in connecting throug aspx page.

Please reply soon because I am very much confused and totally unable to resolve the problem.




Re: SQL Server 2000 and ASP.NET connection problem

Arnie Rowland


Try the combination of the IP address and the server instance name, e.g.,

"data source=172.16.3.11\SQL Server;







Re: SQL Server 2000 and ASP.NET connection problem

Il-Sung Lee - MSFT

Are you sure that "172.16.3.111" is the name of your instance This doesn't sound right. Also, is the instance on a local or remote machine If it's remote, then you need to make sure that the server's firewall is properly configured. Here is a KB for configuring SS2K for remote connections: http://support.microsoft.com/kb/841252/

Il-Sung.







Re: SQL Server 2000 and ASP.NET connection problem

Jens K. Suessmeyer

To help you to find out which instance name is present on the server, navigate to the server open the service manager and navigate to the SQL Server service (name MSSQLSERVER for the default instance, or MSSQL$YourInstanceName for names instances). having this information you can use one of the Data source for your connectionstring from below:

Default Instance: 172.16.3.111
NamedInstance: 172.16.3.111\YourInstanceName

If you have a different port assigned to the services then the default one (1433) (e.g. for security reasons) you can use the following syntax:

172.16.3.111,Portnumber , e.g. 172.16.3.111,1455


Jens K. Suessmeyer.

---
http://www.sqlserver2005.de
---