Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > httpModule...

Reply
Thread Tools

httpModule...

 
 
=?Utf-8?B?UnlhbiBDcm9td2VsbA==?=
Guest
Posts: n/a
 
      09-23-2004
I have written an httpModule for use in our test environment. If a user goes
to http://testserver/SomeApplication/MyPage.aspx it will resolve to the
latest version of that application deployed:
http://testserver/SomeApplication.1.0.10.0/MyPage.aspx, for instance.

Problem is, the httpModule doesn't get called because
http://testserver/SomeApplication doesn't exist. I assume this is because
IIS is spitting it back, but I am not sure. Can someone help me figure out a
decent way of getting that to work? Do I need an ISAPI filter instead?
 
Reply With Quote
 
 
 
 
Joseph E Shook [MVP - ADSI]
Guest
Posts: n/a
 
      10-01-2004
Ryan Cromwell wrote:
> I have written an httpModule for use in our test environment. If a user goes
> to http://testserver/SomeApplication/MyPage.aspx it will resolve to the
> latest version of that application deployed:
> http://testserver/SomeApplication.1.0.10.0/MyPage.aspx, for instance.
>
> Problem is, the httpModule doesn't get called because
> http://testserver/SomeApplication doesn't exist. I assume this is because
> IIS is spitting it back, but I am not sure. Can someone help me figure out a
> decent way of getting that to work? Do I need an ISAPI filter instead?


Because the file does not exist the worker process never gets a chance
to play in the web request. Well the directory surely doesn't exist so
you don't even get the default mapped file. IIS just throughs back the
404 error. Note that that error is a htm page. You can configure this
to use your own code. So I will bet that you can map the 404 error in
IIS "Custom Errors" tab to your HttpModule code. But you will have to
implement your HttpModule as a .ashx file. Now I haven't done this
specifically I think this will work. Tell me if this works for you.

Make sure that you check the url string and still send back the normal
404 error content when a visitor hits a web site not in the url of interest.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57