ASP.NET HTTPHandler

Posted by josephj1989 on Stack Overflow See other posts from Stack Overflow or by josephj1989
Published on 2010-06-17T02:11:48Z Indexed on 2010/06/17 2:12 UTC
Read the original article Hit count: 552

Filed under:
|
|

I have an HttpHandler class (implements IHttphandler) where the path defined for the handler in web.config is *.jpg. I am requesting a Jpg image in my page. Within the HTTP Handler I am writing to a file in the filesystem. By mistake I was trying to write to a non existant directory. This should have thrown an exception but the execution simply proceeds.Ofcourse no file is writte. But if I give a proper directory the file is written correctly.Is there anything special about HttpHandler Exceptions. See part of the code

 public void ProcessRequest(HttpContext context){

        File.WriteAllLines(context.Request.ApplicationPath+@"\"+"resul.log",new string[]{"Entered JPG Handler"});

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about http