Asp.net application cannot connect to sql2000 server in VS2003 IDE but OK on installation!

B

bk

This is driving me crazy. I get "SQL Server is unavailable or does not
exist" error while developing asp.net application in vs2003's IDE
development mode but when I install the application on the server the
error disappears and everthing seems to be ok.

The error does not appear when I connect to the same databse on the
local sql2000 server. I use the same connection string for local
WindowsXP+sql2000 server and the remote Windows 2003 server+sql2000
with ip address changed from 127.0.1 to ip address of the remote
server.

I am able to connect to remote server using sqlConnection control from
the Toolboox. I copied the connection string from sqlConnect
ConnectionString property but error persists. I am aslo able to connect
to server using Query Analyzer and Enterprise Manager.

My connection string is
string sConStr= "Server = 192.168.0.28;User ID=myuser;Initial
Catalog=pubs;Password=mypassword"
I have read

http://support.microsoft.com/?id=328306

and looked at all the possible connection strings at:

http://www.able-consulting.com/dotnet/adonet/Data_Providers.htm#SQLClientManagedProvider
Any help on this will be appreciated.

BK
 
J

Jason Penniman

Just to clarify in my own mind, do you mean that when you execute/debug the
code in VS (hitting F5), when Connection.Open() executes, you get the
exception?
 
B

bk

Yes indeed. The exception occurs when I press F5. If i install the
application on the server and then point the browser to the server no
sql exception error occurs!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top