Protecting databases

joe_pool_is

Contributor
Joined
Jan 18, 2004
Messages
507
Location
Longview, TX [USA]
I have a website with a database. All connections to my database go through a secure connection, however, if someone were to know the name and address of my database file, they could easily download it.

Ex: http://www.my-website/aspnet-client/database1.db
Anyone who knew this Internet address could download the database.

How can I make it so that someone would have to enter a "username/password" combination to access it? Or is there another, more conventional method of doing this?

Regards,
Joe
 
I protect my databases by not putting them in the web share. If I'm using Access I'll set up my application structure like this.

Code:
/ApplicationName
    /Databases
    /www

Then I will set up the www folder as the root of my web share. Then you can give the IUSER necessary permission to use the database, with out worring about someone downloading it.
 
Derek Stone said:
Your best bet is to store the connection string with a full path (not relative path) to the database in the application's configuration file (web.config).
Derek,
I am posting my files to an ISP using the "Copy Project" feature of Visual Studio .NET. How do I get the full path? I don't even know what that would be.

Thanks for helping!
 
Back
Top