G
Guest
I am trying to create a simple HTTP handler in ASP.net 2.0. I am using VS
2005. I am trying to handle a custom extension file givein in the URL. I
have also created the following entry in the web.config file
<httpHandlers>
<add verb="*" path="*.imgw" type="Customhandler.Handler,Handler" />
</httpHandlers>
following is the code in Handler.ashx file
<%@ WebHandler Language="C#" Class="Customhandler.Handler" %>
using System;
using System.Web;
namespace Customhandler
{
public class Handler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
During compliation there is no error..but when I run the code, I get the
following error
Could not load file or assembly 'Handler' or one of its dependencies. The
system cannot find the file specified
the following line from the web.confg file is highlighted in RED
<add verb="*" path="*.imgw" type="Customhandler.Handler,Handler" />
I can understand that it is looking for handler.dll file. But I do not see
any DLL file beign createdin VS 2005. I am a little new to VS 2005. Does
anyone know how to resolve this problem
many thanks
pradeep_tp
2005. I am trying to handle a custom extension file givein in the URL. I
have also created the following entry in the web.config file
<httpHandlers>
<add verb="*" path="*.imgw" type="Customhandler.Handler,Handler" />
</httpHandlers>
following is the code in Handler.ashx file
<%@ WebHandler Language="C#" Class="Customhandler.Handler" %>
using System;
using System.Web;
namespace Customhandler
{
public class Handler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
During compliation there is no error..but when I run the code, I get the
following error
Could not load file or assembly 'Handler' or one of its dependencies. The
system cannot find the file specified
the following line from the web.confg file is highlighted in RED
<add verb="*" path="*.imgw" type="Customhandler.Handler,Handler" />
I can understand that it is looking for handler.dll file. But I do not see
any DLL file beign createdin VS 2005. I am a little new to VS 2005. Does
anyone know how to resolve this problem
many thanks
pradeep_tp