Hi as you are using windows application and you want to access DB which is hosted on Server
means if your want to Login then they should have internet connection which can access this account simply in app.config file you need to add DB connection with user name and Password credentials which will authorize user to access that DB from server. before that you need to check for Internet connection available at user machine or not then only he/she would be able to access DB. For Net Connection Check you can use below Code.
public static bool HasConnection()
{
try
{
System.Net.IPHostEntry i = System.Net.Dns.GetHostEntry("www.google.com");
return true;
}
catch
{
return false;
}
}
Add Db Connection in app Config like Below.
<connectionstrings>
<add name="ApplicationServices" connectionstring="Data Source=;Initial Catalog=;Integrated Security=True;username=;password=;">
providerName="System.Data.SqlClient" />
</add></connectionstrings>