all groups > sql server connect > may 2007 >
You're in the

sql server connect

group:

'SQL server does not allow remote connections' error


RE: 'SQL server does not allow remote connections' error changliw NO[at]SPAM online.microsoft.com
5/31/2007 12:00:00 AM
sql server connect:
Hi Dan,

I understand that your ASP.NET application failed to connect to your SQL
Server 2005 however another web application could connect to the SQL Server
2005 on the same server.
If I have misunderstood, please let me know.

Since the other ASP.NET application could connect to your SQL Server 2005,
I think that there might be some differences between the two client
connections. I recommend that you check the following:
1. Check if the two connection strings are same;
2. Run "sqlcmd /Snp:<servername>\<instance name> /Usa /P<password>" to
connecto to your SQL Server to see if it can succeed;
3. Run "cliconfg.exe" from command line to add an alias with Named Pipes
protocol and then check if you can connect to your SQL Server with that
alias;
4. If that does not work, try adding an alias with TCP/IP protocol and then
use the alias in your connection string to connect to your SQL Server.
You may refer to:
How to connect to a named instance of SQL Server 2005 or SQL Server 2000 by
using the client tools in the earlier version of SQL Server
http://support.microsoft.com/kb/265808
Creating a Valid Connection String Using TCP/IP
http://msdn2.microsoft.com/en-us/library/ms191260.aspx
Creating a Valid Connection String Using Named Pipes
http://msdn2.microsoft.com/en-us/library/ms189307.aspx

If this issue persists, I also would like to know the startup information
of your SQL Server. Please mail me (changliw_at_microsoft_dot_com) the SQL
Error logs (%ProgramFiles%\Microsoft SQL Server\MSSQL\LOG) for further
research.

Hope this helps. If you have any other questions or concerns, please feel
free to let me know.

Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications

If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.


Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
'SQL server does not allow remote connections' error musosdev
5/31/2007 1:28:02 AM
Hi

I wonder if someone could help me out. Sporadically, I keep getting the
following error on my ASPX pages which connect to SQL Server...

"An error has occured 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)"

The thing is... I KNOW it was working fine, cos I put it there and I tested
it. Even stranger, another .net website on the same server is connecting fine.

Can somone give me an idea of what this error message occurs, and why it
sporadically breaks itself. And also... how to fix it and prevent it from
happening?!

Thanks,



RE: 'SQL server does not allow remote connections' error vijayrod
5/31/2007 8:33:00 AM
Does SQL 2005 have the latest service pack and udpates ?

http://support.microsoft.com/kb/913089 - How to obtain the latest service
pack for SQL Server 2005


If above does not work -
Looks like you using named pipes or shared memory protocol! Can you try
using TCP/IP ?




[quoted text, click to view]
RE: 'SQL server does not allow remote connections' error musosdev
6/6/2007 7:01:09 AM
Hi Charles

Thanks for making me check the obvious - turns out the web.config file got
mangled somewhere in the transfer. Applied the correct connection string and
save locations to the web.config, and it's back up and running!

Cheers



Dan


[quoted text, click to view]
RE: 'SQL server does not allow remote connections' error changliw NO[at]SPAM online.microsoft.com
6/7/2007 12:00:00 AM
Hi,

Appreciate your update and response. I am glad to hear that the problem has
been fixed. If you have any other questions or concerns, please do not
hesitate to contact us.

Have a nice day!

Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications

If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.


Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================



AddThis Social Bookmark Button