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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect string in the web.config file

Status
Not open for further replies.

bigfoot

Programmer
May 4, 1999
1,779
US
I'm running SQL Server 2K and IIs on a Win2000 server.

Is there anything wrong with putting my connection strings in my web.config file? I'm asking this because it sits out in a folder off the Can't this be downloaded by a hacker and used against me?

I'd like to use windows security, but it is not working right. I'd like to not have to have my users log in, but only if they are coming in from out side the building.
 
I put my connection strings into web.config. Just make sure that your server will not serve a .config file. In this way a hacker can't even see that you have a config file.

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Enlighten me on how to check this please.
 
By default, ASP.NET will NOT serve .config files. You can check this by browsing to:

Code:
[URL unfurl="true"]http://myserver/myapp/web.config[/URL]

You should get an error page saying it doesn't serve these pages.

--James
 
How about an XML file that I will be using to fill a dropdown for the 52 states?

Can I put this in a pertected folder?
 
I put it in the _private folder and it works great.

I ove this XML stuff!!! It's great for a small - low overhead database file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top