Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hey guys,
i'm new to the asp.net world (so far i developed in winforms desktop applications).
i just baught a domain and a windows 2008 R2 standard+PLESK hosting.
through the plesk panel, i created an sql server database.
in my local pc, i have a vb.net winform application and i'm trying to connect to the database. so far, no good.
my connectionString is like this:
"Data Source= my_ip ;Network Library = DBMSSOCN;initial Catalog=my_db_name;User ID = my_user_name;Password=xxxx"

maybe i need to mantion the port? (whats my port, i have no idea...)
again, this subject is brand new to me. any advice on how to get thing started will be very kind. and another thing: the panel is very (very!) slow and has the most basic options. is there anyway to manage the database through other platform?
thanks a lot,
oron.
Posted

1 solution

Basically the same connection string should work especially since you're using SQL server authentication.

Id suggest checking that the instance isn't a named instance and if it is, provide the name for the instance in the data source. For complete examples, have a look at https://www.connectionstrings.com/sql-server/[^]

If the hosted database is clustered then you most likely need to define the port.
 
Share this answer
 
Comments
oronsultan 27-Sep-15 7:44am    
is the user id in the connection string is the user name?
Wendelius 27-Sep-15 8:12am    
Yes, the user id is the name of the user (or actually login) as recognized by Sql Server
oronsultan 27-Sep-15 8:15am    
i'm still not solving this issue. is there any configuration i need to do on my side? maybe my firewall? if i have sql server on my local pc, can i connect it to my remote database?
Wendelius 27-Sep-15 8:18am    
What is the exact error message you get?
oronsultan 27-Sep-15 8:23am    
There was an error related to the network or instance-specific error when establishing a connection to SQL Server. The server was not found or is not available. Verify that the show right Os- SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

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