Tuesday, February 14, 2012

Cannot connect to localhost from "Server Explorer" in Visual Studio 2005.

hi ,

I am trying to connect to my local SQL server 2005 from "Server Explorer" but it is giving the error of "Remote Connectons" not allowed.

I am using "windows authentication" login.

My SQLExpress and SQLExpress browser are running from "SQL server configuration manager".

If i use a "App.Config" file to connect to database, the SQl connection can open and i can run the stored procedure.... but cannot access the database on my local machine.

Please help.

thanks for reply.

With regards,

Girish.

Hi Girish,

by default all remote connections are disabled. Open sql server configuration manager and enable the appropriate type of connection. (... and take a look at your windows firewall on your local machine!)

CU

tosc

|||Can you post your connection string and the exact error message?|||An error has occured while establishing a connection to the server. When connection 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|||

Hi Girish,

there is a post at SQL Protocol which might helps: http://blogs.msdn.com/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx

CU

tosc

|||

You did not post the whole error message, the part you omitted contains most important part of this error message, it's a winerr code.

What's your connection string? Did you put .\sqlexpress or only .? You should use .\sqlexpress.

|||

Done ... thanks for the help.

With regards,

Girish

No comments:

Post a Comment