Remote Connection To Ms Sql From Another Site !!!

unicode

Guppy
Hello,

I believe that Remote connection is enabled on MSSql10 ... When I'm trying to connect to the server using the Connection String (ASP.NET 2.0 C#) ... it's giving me the following error:

Server Error in '/' Application.
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: TCP Provider, error: 0 - A socket operation was attempted to an unreachable host.)

I have tried all possible connection methods which I could find ... typically speaking ... the string which I have used is something like:
<connectionStrings>
<add name="connection" connectionString="Data Source=64.187.103.158,1433;Network Library=DBMSSOCN;Initial Catalog=xxxxxxx;uid=xxxxxx;pwd=xxxxxxxxxxx"></add>
</connectionStrings>

<connectionStrings>
<add name="connection" connectionString="Data Source=64.187.103.158,1433;Database=xxxxxxx;uid=xxxxxx;pwd=xxxxxxxxxxx"></add>
</connectionStrings>

... and so on ...

What I am trying to do is program a page which would be hosted elsewhere but can access the database resting on mssql10 !!!

ANY SUGGESTIONS - HELP - ASSISTANCE !!! ... PLS

Regards,
Ani
 
Remote connections are enabled. You can verify by connecting to database using any database tools.
Please try to use "Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;" in connectionString.
 
Hello Praveen,

Thanx for your reply - I just tried that out - and found the following errors:

connectionString="Data Source=mssql10.xxxx;Initial Catalog=dbname;User Id=someusername;Password=pwd;">

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)

and when substituting the Data Source=hostname,1433 with an IP Address ...

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: TCP Provider, error: 0 - A socket operation was attempted to an unreachable host.)

Any Suggestions !!!

Regards,
Ani
 
I would also like to update that I have also tried this option out:

Data Source=64.187.103.158,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;

... but still no luck :( !!!!

Ani
 
Yeah - have already had a look at that link :)

Have tried the options listed their (below .Net)... But no luck ...

Ani
 
Is the Server Configured for TCP/IP and Named Pipes ...

While searching on the sites - I found that we can connect to the server using telnet ip:1433 - or using sqlcmd - but it does not allow us to do that.

Is that turned off for security !!!

Any solution, suggestion !!!

Ani
 
I hope I can crack the problem !!!

Am unable to understand where the problem is ... am doing quite the same as it's stated :(

Ani
 
Please send us a ticket with the link in which you are getting error. We will check it and let you know the issue.
 
Back
Top