ASP.NET request extension type
Posted
by Krishna
on Stack Overflow
See other posts from Stack Overflow
or by Krishna
Published on 2010-04-20T21:49:37Z
Indexed on
2010/04/20
21:53 UTC
Read the original article
Hit count: 238
Hello,
I am working on a large web application which I have recently shelved tons of .aspx pages from the project.
To avoid page not found error, I added these entities in the xml which came around 300+ in count. I wrote a http module that checks the request url in the xml entities and if they are found, my module is going to redirect the request to respective new pages.
Everything works great, but my collection is getting iterated for all the requests, I mean for each and every .jpg, .css, .js, .ico, .pdf etc.
Is there any object or property in .net that can tell the type of request that user requested for like HttpContext.request.type. So that I can avoid checking the request for all unwanted file types.
© Stack Overflow or respective owner