Hi !
I am using a httphandler to perform some url rewriting in my
application. My web.config contains the following entry to direct all
urls containing /App/*.ashx to my class AppHandler.cs in namespace
mySite.Web
<httpHandlers >
<add verb="*" path="App/*.ashx"
type="mySite.We b.AppHandler, App_Code"/>
</httpHandlers>
It works perfectly fine in Firefox, but the redirection does not take
place in IE. In IE I get a 404 error - Page cannot be found, and the
address bar contains :
http://localhost/mySite/App/?keyword=mySearchWord
The Debug output showed :
A first chance exception of type
'System.Threadi ng.ThreadAbortE xception' occurred in mscorlib.dll
An exception of type 'System.Threadi ng.ThreadAbortE xception' occurred
in mscorlib.dll but was not handled in user code
Based on some suggestions I found in some forums I tried modifying my
Redirect statement in the AppHandler from
context.Respons e.Redirect(redi rectionURL);
to
context.Respons e.Redirect(redi rectionURL,true );
in which case I get the same Debug ouput. If I also enclose this
statement inside a try catch, I get the following Debug output
A first chance exception of type
'System.Threadi ng.ThreadAbortE xception' occurred in mscorlib.dll
A first chance exception of type
'System.Threadi ng.ThreadAbortE xception' occurred in
App_Code.k5agqn 3f.dll
An exception of type 'System.Threadi ng.ThreadAbortE xception' occurred
in App_Code.k5agqn 3f.dll but was not handled in user code
The thread 0xec0 has exited with code 0 (0x0).
( App_Code is the assembly name for my AppHandler )
WHAT IS HAPPENING ??!! Please help !