ASP.NET application - Error when trying to connect to a SQL Server 2008 instance
Posted
by
Pablo Dami
on Stack Overflow
See other posts from Stack Overflow
or by Pablo Dami
Published on 2011-01-03T23:20:52Z
Indexed on
2011/01/06
19:54 UTC
Read the original article
Hit count: 306
Hi everyone! Despite that I’m a regular reader of this great forum, this is my first post on it. I believe that this community can help me with the following problem that I have. I’m trying to publish an ASP.NET website over an IIS 6.0 (Windows 2003 Server), and I have some troubles trying to connect to the database. Curiously, I have installed another ASP.NET website into the same IIS 6.0 with the same properties and security parameters and can connect without problems with the same database. The application that works fine is almost the same that the one that can’t connect with SQL Server (actually is the same but with several modifications). I’ll enumarate some information related to the problem:
- S.O: Windows 2003 Server
- SQL Server Engine: SQL Server 2008 SQL Server accept remote connections? Yes.
- ASP.NET version: 2.0.50727
- The connections via TCP/IP are enabled to the SQL Server instance? Yes.
- The corresponding user that I have in the connection string, actually exists into the database with the “owner” role? Yes.
- ORM Tool used: nHibernate
I get the following error when I try to run the aplication into the browser:
Error while establishing a connection to the server. When connecting to SQL Server 2005, this failure may occur because the default settings SQL Server does not allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server)
In order to isolate the problem, I made some test. For example, using the web app that works fine I can connect without any problema with the database that uses the web app that can’t. With this evidence I concluded that the problem is within the web app and not into the SQL Server instance. I also google it my problem but sadly I can't find nothing usefull to solve it.
If someone can help me I’ll appreciate that. Thank you so much for your time!
© Stack Overflow or respective owner