Dear Dudes, How can I prevent HTTP access to my .MDB files?

B

Babbling Brooke

Dear Dudes,

I have a hosted ASP.NET website, and I want to prevent HTTP access to my
..MDB database file. The following is in my web.config at root of website:
.. . .
<httpHandlers>
<add verb="*" path="*.mdb" type="System.Web.HttpForbidden­Handler"/>
</httpHandlers>
.. . .
However, this had no effect. If I type http://www.mywebsite.com/db/mydb.mdb
in Internet Explorer, I get the dialog allowing me to open or save the file.

Any futher suggestions?
 
P

Peter Rilling

It has no effect because database files are not processed by the
aspnet_isapi filter. Two ways you can do this, configure the virtual root
to send the MDB files through the aspnet_isapi.dll filter, or move the file
out of the virtual root. The later is preferable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top