Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi:
My server is sql 2008 which is in my head office and i have developed a C# Windows application
I want to connect my office server from Branch using the application
i have port forwarded the router where sql server is installed, but when i connect from server from branch office it throws the following error

i have tried this using management studio also but i got the same error

C#
a connection was successfully established with the server but then an error during login process. (Provider: TCP Provider, Error :0 - the specifed network is no longer available.) (Microsoft sql Server , error:64)
Posted

hi visit this link,

http://stackoverflow.com/questions/7762204/a-connection-was-successfully-established-with-the-server-but-then-an-error-occ[^]

(or) read this

Error Message:


The specified network name is no longer available.

Explanation:

The network resource that you specified was either temporarily taken offline or is no longer available. It is possible that: (1) the share at the server might have been temporarily deleted; (2) the server that shared the resource might have been turned off; or (3) the permissions might have been changed.



regards
sarva
 
Share this answer
 
v3
step 1: follow steps given in this link to setting up database on server pc
http://support.microsoft.com/kb/914277[^]

step 2: after step 1 complete then change connection string's parameters,
datasource = server-name OR IP-Address [which is in sharing now after step 1] ; [For ip address cmd > ipconfig -it will show ip address]
Initial catalog = your database name ;
UserId = sql server - user login Id ;
Password = sql server - user login password;

Happy Coding!
:)
 
Share this answer
 
I know it's not quite what you are asking but have you thought of developing a web application that hosts web services that sits in the same enviroment as your SQL instance instead of connecting directly to the SQL instance from th client?, Connecting directly could be a security risk.

You can then have your web application connecting directly into SQL which will give you less problems and will be more secure.
 
Share this answer
 
v2
Hi,

Please check you DB user name and password, I think those are incorrect.

Thanks
Suvabrata
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900