I'm moving from a shared hosting to Virtual Dedicated Server (both at GoDaddy). Suprisingly, everything went fine up until now. However, now my web application seems unable to connect to the database (which I created on the server).
I tried several options, including giving it the server name etc. for example:
<add name="dbname" connectionString="Data Source=servername\SQLEXPRESS2008;Initial Catalog=theDB;User Id=servername\usernameAcceptedByMangmentStudio;Password=mypwd; Trusted_Connection=False;"/>
also:
<add name="dbname" connectionString="Data Source=.\SQLEXPRESS2008;Initial Catalog=theDB;User Id=usernameAcceptedByMangmentStudio;Password=mypwd; Trusted_Connection=False;"/>
also:
<add name="dbname" connectionString="Data Source=servername\SQLEXPRESS2008;Initial Catalog=theDB; Integrated Security=True;>
(this is how it works on my local machine).
nothing seems to work. any ideas? thanks in advance.
If your DB has UserName and Password(SQL Server Authentication) just simply use this:
FYI: Make sure your database Server Authentication is SQL Server and WindowsAuthentication mode
You can check also : Connection strings for SQL Server 2008 for more info.
Regards