March 15, 2010 at 6:33 am
Hi guys,
i just finished a .Net Web application for a client. I've uploaded it to their site. The problem is that the connection string property in the web.config file doesn't seem to work. The current connection string looks like this: "Data Source=Server1.DSNConn1;Database=ServerOne;Trusted_Connection=no;User Id=serverman;Password=*******"
The online server is a SQL Server 7.0. I tried creating a DSN on the Hosting server and replaced it in the web.config file, but it still didn't work. Maybe i should try to use the IP address or server name, but i'm unsure about how to do it.
Pls help. Thanx.
March 15, 2010 at 7:03 am
try using
initial catalog
, instead of
database
:
Data Source=servername;Initial Catalog=dbname;
or try: http://www.connectionstrings.com
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
March 15, 2010 at 7:16 am
Do you have an error?
I would suggest you grab a template from ConnectionStrings.com, as noted above, and use that.
March 15, 2010 at 8:27 am
Thanx Guys. I was actually at connectionstrings.com before coming here. I wasn't just sure which one to use. Still confused.
March 15, 2010 at 8:41 am
Use this:
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
That's a basic, standard one for .NET connections with a user/pwd. If you can use trusted connection, that's great, but this should work. The DSN stuff can work, but it introduces a potential dependency on the particular machine and other setup.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply