IIS Server Security - Raise error when requesting files..

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server Security > May 2004 > Raise error when requesting files..





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Raise error when requesting files..
Solle

2004-05-30, 11:52 am

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...
Ken Schaefer

2004-05-31, 2:49 am

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

"Solle" <anonymous@discussions.microsoft.com> wrote in message
news:477FE101-D97D-4C6F-B516-13CF955432A5@microsoft.com...
: 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...


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com