Problems with httpHandlers --> Help me please

L

Luis

Hi,

I want to protected all files in my website, so I try to use httpHandlers, I put this in my WEB.CONFIG (at the end of page), but I can't protected the files type MDB, CSB, can someone help me? :

<httpHandlers>

<add verb="*" path="*.mdb" type="System.Web.HttpForbiddenHandler" />

<add verb="*" path="*.csv" type="System.Web.HttpForbiddenHandler" />

</httpHandlers>



I see this example in http://support.microsoft.com/default.aspx?scid=kb;EN-US;815152
 
P

Philip Rieck

Luis
1) Please use plain text format if possible when posting
2) You may want to try posting to the asp.net forum instead of C#

3) In order for your handlers to ever have an effect, the file extensions in
question must be mapped to ASP.NET in IIS's configuration. By default, IIS
asks ASP.NET to handle only .aspx, ascx, asax, asmx, ashx, .cs, .vb,
possibly a few more. In IIS6.0, it's possible to construct a wildcard
mapping that will map all requests to ASP.NET. In IIS5.0, you'll have to do
it the hard way.

Read this link for much more information:
http://aspnet.4guysfromrolla.com/articles/020404-1.aspx



Hi,

I want to protected all files in my website, so I try to use httpHandlers, I
put this in my WEB.CONFIG (at the end of page), but I can't protected the
files type MDB, CSB, can someone help me? :

<httpHandlers>
<add verb="*" path="*.mdb" type="System.Web.HttpForbiddenHandler" />
<add verb="*" path="*.csv" type="System.Web.HttpForbiddenHandler" />
</httpHandlers>

I see this example in
http://support.microsoft.com/default.aspx?scid=kb;EN-US;815152
 

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

Top