Groups | Blog | Home
all groups > iis security > may 2004 >

iis security : Raise error when requesting files..


Solle
5/29/2004 8:56:01 AM
Just wondering if its possible to raise an error when requesting eg. a JPG file, just like requesting the global.asa

Ken Schaefer
5/31/2004 4:49:13 PM
Do you just want to return a HTTP 500 Status? If so, you can write an ISAPI
filter or similar for that.

If you want to raise an application exception, easiest might be using .Net
Add the .jpg extension to the list of extensions that ASP.NET handles, and
write your own HTTPHandler, which can then do what it wants, including
raising System.Exception etc

Cheers
Ken

[quoted text, click to view]
: Just wondering if its possible to raise an error when requesting eg. a JPG
file, just like requesting the global.asa?
:
: When requesting the global.asa you'll get the "HTTP Error 500-15 -
Requests for global.asa not allowed" error ... and I would like something
similar with the .JPG file...

AddThis Social Bookmark Button