PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Severe Problems while conencting to SQL 200 from Ado.net 2.0
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Severe Problems while conencting to SQL 200 from Ado.net 2.0
![]() |
Severe Problems while conencting to SQL 200 from Ado.net 2.0 |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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? FrankTheTank wrote: > 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? |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

