Hi,
I develop in vs.net 2005, but when porting the website to the live enviorment, the sql server suddenly is no longer a local file, but it's on another server in the park.
When I use this code (in the Web.config):
What happends then, is that I get an msg-box:
"Login failed for user 'USERNAME\COMPUTERNAME$'"
I also tried making a user in the sql db and giving it permissions to the db and then I tried with this code:
However, that code did not work, due to the fact that "mixed mode" authentification is not allowed in the sql server.
Should I use the windows authentification or should I use the "mixed mode"? Also, can I change the user it will try to authenticate with, as it in the first sample tries with one user that does not authenticate with the sql server on the remote server.
Olav Alexander Mjelde
Admin & Webmaster
I develop in vs.net 2005, but when porting the website to the live enviorment, the sql server suddenly is no longer a local file, but it's on another server in the park.
When I use this code (in the Web.config):
Code:
<add name="connString" connectionString="Network Library=DBMSSOCN;Data Source=xxx.xxx.xxx.xxx,1433;Initial Catalog=myDataBaseName.mdf;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />
What happends then, is that I get an msg-box:
"Login failed for user 'USERNAME\COMPUTERNAME$'"
I also tried making a user in the sql db and giving it permissions to the db and then I tried with this code:
Code:
<add name="connString" connectionString="Network Library=DBMSSOCN;Data Source=xxx.xxx.xxx.xxx,1433;Initial Catalog=myDataBaseName.mdf;User ID=myDataBaseUser;Password=myDataBasePassword"
providerName="System.Data.SqlClient" />
However, that code did not work, due to the fact that "mixed mode" authentification is not allowed in the sql server.
Should I use the windows authentification or should I use the "mixed mode"? Also, can I change the user it will try to authenticate with, as it in the first sample tries with one user that does not authenticate with the sql server on the remote server.
Olav Alexander Mjelde
Admin & Webmaster