Friday, February 10, 2012

connect to sql server 2000 on LAN

Hello,
I have an asp.net web application on server #1, and I am
trying to connect it to a SQL Server 2000 database on
Server #2. Both servers are in the same domain on the
LAN. How should I edit the appSettings element in
web.config to make this possible? I have this: <add
key="ConnectionString"
value=" server=server_ip;Trusted_Connection=true
;database=da
tabase_name" />
In the webform code-behind(C#), this is what i have:
SqlConnection myConnection = new SqlConnection
(ConfigurationSettings.AppSettings["ConnectionString"]);
I believe that all permissions and logins on the sql
server are correct, but i could be wrong, so please tell
me how to set them correctly.
Also I should mention that this web application and
database connection works just fine when connecting to sql
server on localhost(yes, I also have an instance of sql on
the same machine as the web app). Any help would be
greatly appreciated! email: asweeney@.suscom.net if you
need more info to resolve this problem.
ThanksSee the following:
247931 INF: Authentication Methods for Connections to SQL Server in Active
http://support.microsoft.com/?id=247931
Building Secure ASP.NET Applications
http://msdn.microsoft.com/library/d...-us/dnnetsec/ht
ml/secnetlpMSDN.asp
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

No comments:

Post a Comment