Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting a web to a database

Status
Not open for further replies.
Sep 29, 2002
524
US

A have a website that a friend helped me to bring up few years ago. The site has hosted in a server that also had SQL installed locally. This server was Win 2003 with SQL 2000 using SQL Auth. The server crashed and now I have temporarily to a Windows 2000 while the database now resides in a separate box that has Windows 2003 and SQL 2005. What is the web.config string that I should use in order to connect the site to the proper database using SQL Auth? Is there any special port that I should specify in order to get the server to connect? I have everything using the defaults.

Thanks,


Gladys Rodriguez
GlobalStrata Solutions
Computer Repair, Website Design and Computer Consultant
Small Business Resources
Anime, Manga and Video Games
 
Here is an FAQ about connection strings. If it doesn't help post back.

faq855-5780

- Paul [batman]
- If at first you don't succeed, find out if the loser gets anything.
 
Thanks Guys. Before I posted, I looked at these.

Because of the many pages that I have in the site that are using, I want to keep the connection in the web.config. I used several settings from but it always seemed that the web server could not connect to the database. So, I think the problem is more connectivity to the server. So, the question is, do I had to setup a DSN from the web server in order to connect to SQL server or can I use a DSN less connection? Using a DSN less connection, how can I test that the web site is really connecting to the database?

Thanks for your help,


Gladys Rodriguez
GlobalStrata Solutions
Computer Repair, Website Design and Computer Consultant
Small Business Resources
Anime, Manga and Video Games
 
The OP is a little murky. Let's clear-up the current configuration, first:

[ul]
[li]IIS Web server hosted on a Windows 2000 box[/li]
[li]SQL Server 2005 on a Windows 2003 box[/li]
[/ul]

Is this correct?
 

yes. This is correct. Everything seems to work like the site is working, but I know it is not connecting/reading from the database given in the web.config because it tries to run few scripts that are only executed when the application is installed new and there is not an existing database in place.

Thanks again,


Gladys Rodriguez
GlobalStrata Solutions
Computer Repair, Website Design and Computer Consultant
Small Business Resources
Anime, Manga and Video Games
 
After I ask about firewalls, I might suggest you take this to the ASP.Net forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top