| Disallow download of certain file type |
|
| Author |
Message |
memoto

|
Posted: Wed May 09 22:10:31 CDT 2007 |
Top |
ASP.Net >> Disallow download of certain file type
Hi. I can't place an mdb database above the http root, so anyone is
able to download it through their browser if they know where it is.
This database contains some sensitive information. I am used to Apache
server and open source languages, I think web.conf is sort of
equivalent to Apache's .htaccess, is there some way I can edit
web.conf to disallow access to mdb files?
I'm sorry if this is not the exact group I should be posting in, but I
don't know where else to post. I am developing the application in
ASP.net, so I figured this would be an appropriate place.
-Mike PII
Web Programming9
|
| |
|
| |
 |
Mike

|
Posted: Wed May 09 22:10:31 CDT 2007 |
Top |
ASP.Net >> Disallow download of certain file type
Also, by the way, I am getting the following error message when I try
to alter the database:
System.Data.OleDb.OleDbException: Operation must use an updateable
query.
This is a permission error, right? I found a page on Microsoft support
about it here:
http://support.microsoft.com/kb/175168
but I'm wondering if there might be some other cause for the error.
-Mike PII
|
| |
|
| |
 |
Steve

|
Posted: Wed May 09 22:43:52 CDT 2007 |
Top |
ASP.Net >> Disallow download of certain file type
You'd typically use IIS to set what kinds of files can and cannot be
downloaded.
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"sumguyovrthar" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> Hi. I can't place an mdb database above the http root, so anyone is
> able to download it through their browser if they know where it is.
> This database contains some sensitive information. I am used to Apache
> server and open source languages, I think web.conf is sort of
> equivalent to Apache's .htaccess, is there some way I can edit
> web.conf to disallow access to mdb files?
>
> I'm sorry if this is not the exact group I should be posting in, but I
> don't know where else to post. I am developing the application in
> ASP.net, so I figured this would be an appropriate place.
>
> -Mike PII
>
|
| |
|
| |
 |
Michael

|
Posted: Wed May 09 22:51:02 CDT 2007 |
Top |
ASP.Net >> Disallow download of certain file type
Hello sumguyovrthar,
Use HttpForbiddenHandler for this in web.config
just add
<add verb="*" path="<your path>" type="System.Web.HttpForbiddenHandler " />
---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
s> Hi. I can't place an mdb database above the http root, so anyone is
s> able to download it through their browser if they know where it is.
s> This database contains some sensitive information. I am used to
s> Apache server and open source languages, I think web.conf is sort of
s> equivalent to Apache's .htaccess, is there some way I can edit
s> web.conf to disallow access to mdb files?
s>
s> I'm sorry if this is not the exact group I should be posting in, but
s> I don't know where else to post. I am developing the application in
s> ASP.net, so I figured this would be an appropriate place.
s>
s> -Mike PII
s>
|
| |
|
| |
 |
Juan

|
Posted: Wed May 09 23:26:24 CDT 2007 |
Top |
ASP.Net >> Disallow download of certain file type
If what you want to do is prevent a download of your .mdb file,
just create an App_Data directory and place the Access database in it.
Files stored in the App_Data folder are not returned in response to direct HTTP requests,
which makes the App_Data folder the recommended location for data stored with your
application, including .mdf (SQL Server Express Edition), .mdb (Microsoft Access), or XML files.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"sumguyovrthar" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> Hi. I can't place an mdb database above the http root, so anyone is
> able to download it through their browser if they know where it is.
> This database contains some sensitive information. I am used to Apache
> server and open source languages, I think web.conf is sort of
> equivalent to Apache's .htaccess, is there some way I can edit
> web.conf to disallow access to mdb files?
>
> I'm sorry if this is not the exact group I should be posting in, but I
> don't know where else to post. I am developing the application in
> ASP.net, so I figured this would be an appropriate place.
>
> -Mike PII
>
|
| |
|
| |
 |
Mike

|
Posted: Thu May 10 17:11:43 CDT 2007 |
Top |
ASP.Net >> Disallow download of certain file type
On May 10, 12:26 am, "Juan T. Llibre" <EMail@HideDomain.com>
wrote:
> If what you want to do is prevent a download of your .mdb file,
> just create an App_Data directory and place the Access database in it.
>
> Files stored in the App_Data folder are not returned in response to direc=
t HTTP requests,
> which makes the App_Data folder the recommended location for data stored =
with your
> application, including .mdf (SQL Server Express Edition), .mdb (Microsoft=
Access), or XML files.
>
> Juan T. Llibre, asp.net MVP
> asp.net faq :http://asp.net.do/faq/
> foros de asp.net, en espa=F1ol :http://asp.net.do/foros/
Thanks, that's just what I needed. Fixed both problems (apparently
App_Data has more compatible permissions by default too).
-Mike PII
|
| |
|
| |
 |
| |
|