APS.NET, IIS cannot connect to SQL Server box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am using the following connection string format in an ASP.NET 1.1
application to attempt to connect to a SQL Server on another machine.

Data Source=ServerName;Initial Catalog=DBName;User
ID=username;password=pwd;persist security info=True;

I am testing this asp.net app. from my local IIS to connect to a SQL Server
instance on another box. It will not work and I am unable to determine why, I
have verified by cutting and pasting the same connection string to a windows
app and the user name and password to isql and both are able to connect
without any problems. The really strange thing is if I use an ip address
instead of a name for the server I can get the web application to connect
without a problem.

The PC that the asp.net app is running on is WIN XP PRO with SP2 and the
most current updates, the SQL Server version is 2000 with the most current SP
and updates.

I think IIS is not able to resolve the name of the server therefore it can't
find it, but I don't know how to fix this.
I have run out of ideas please help.

Thank You
 
Hi Chris,

If you replace ServerName with the IP address does it work?

Ken
MVP [ASP.NET]
 
Ken Cox said:
Hi Chris,

If you replace ServerName with the IP address does it work?

Yes, an IP address works and so does a fully qualified name, It's just not
able to resolve the name by itself.
 
Back
Top