Severe Problems while conencting to SQL 200 from Ado.net 2.0

F

FrankTheTank

We are having a severe problem with connecting a asp.net 2.0
application to sql server 2000. I have searched the internet for about
one day and tried every option there, but there seems no solution. It
is realy strange and we don't know anymore what to do. Let me briefly
explain the situation:

Environement:

Development Machine has SQL 2005 with the Visual Studio IDE. The
solution works fine there.
The Customer's Server has SQL 2000 and .net Framework 2.0.

Now come the odd parts:

When I debug the project on my development machine and trying to
connect to the customers server, I get this (very popular in the
newsgroups) error :

System.Data.SqlClient.SqlException: An error has occurred while
establishing
a connection to the server. When connecting to SQL Server 2005, this
failure
may be caused by the fact that under the default settings SQL Server
does not
allow remote connections. (provider: Named Pipes Provider, error: 40 -
Could
not open a connection to SQL Server)

I tried realy everything: changing connection sring, use np: prefix,
diesabled firewall, enabled remote connections on the server, restart
sql server, check ports, everything. nothing helps.

The odd thing is that when using the DataSetDesigner or the Management
Console, I can always connect to the remote machine without any
problem. But as son as the code from the asp.net application tries to
connect, there is this error. I am using standard datasets to retrieve
data. So conenctivity seems to be there in a way.

Now it gets even more strange: On the customer's computer, I can
connect from one webpage, but not from another one, I get the same
error.

I have seen that there are a lot of discussions related to this topic
with a lot if suggestions, which we all tried but didnt help.

Does anyone have a solution to this?
 
J

Jerry H.

I always get mixed up on this as well, but I suspect that the user
account under which your IIS service runs may not have sufficient
rights to do what your code requests.

Have you looked at the security settings for your app from within IIS?
 

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

Top