I
Ivonne Riedel
Hi everybody,
I have got a serious problem building an HTTPHandler in codebehind style.
I made the following steps:
Create an ASP .net Website project
Add a generic handler.
Rewrite this "Hello World" item into codebehind style so that the .ashx file
has the only line:
<%@ WebHandler Language="C#" Class="handlerpur"
CodeBehind="handlerpur.ashx.cs" %>
The codebehind file has the rest of the former content of the ashx file:
using System;
using System.Web;
namespace MyNamespace {
public class handlerpur : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable {
get {
return false;
}
}
}
}
Trying to build that I get the error:
Could not create type 'myNameSpace.handlerpur' pointing at the first line of
the ashx file.
I checked permissions, the virtual directory on the iis (it has got an app
name), added things to the web.config, checked the framework version on the
iis.
Am I missing something? I do not have a bin directory in my project and
nothing gets compiled.
I am running WinXp SP2, iis 5.1, ASP.net 2.0.50727.
Any help is greatly appreciated
Thanks
Ivonne.
I have got a serious problem building an HTTPHandler in codebehind style.
I made the following steps:
Create an ASP .net Website project
Add a generic handler.
Rewrite this "Hello World" item into codebehind style so that the .ashx file
has the only line:
<%@ WebHandler Language="C#" Class="handlerpur"
CodeBehind="handlerpur.ashx.cs" %>
The codebehind file has the rest of the former content of the ashx file:
using System;
using System.Web;
namespace MyNamespace {
public class handlerpur : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable {
get {
return false;
}
}
}
}
Trying to build that I get the error:
Could not create type 'myNameSpace.handlerpur' pointing at the first line of
the ashx file.
I checked permissions, the virtual directory on the iis (it has got an app
name), added things to the web.config, checked the framework version on the
iis.
Am I missing something? I do not have a bin directory in my project and
nothing gets compiled.
I am running WinXp SP2, iis 5.1, ASP.net 2.0.50727.
Any help is greatly appreciated
Thanks
Ivonne.