[Mono-devel-list] HttpHandler
Cezar Nasui
cezar.nasui at polymtl.ca
Tue Sep 30 15:51:55 EDT 2003
Does the handler works in XSP as is suppose to or am I doing something
wrong ?
I tried a simple handler example :
- create a SimpleHandler which implements IHttpHandler, compile it to
dll and place it under /bin
- create a web.config file
Under xsp/server I created a directory for my application /Test2/ and
I installed /bin under it.
When I start xsp and try to access http://127.0.0.1:8080/Test2/ it
returns the following error:
---
Error in '/Test2/' Application
________________________________________________________________________
Error
Description: Error processing request.
Error Message:
Stack Trace:
System.TypeLoadException: A type load exception has occured.
in (unmanaged) /usr/lib/libmono.so.0(mono_raise_exception+0x20) [0x400a4ba1]
in (unmanaged) /usr/lib/libmono.so.0 [0x400a7dde]
in <0x00056> 00 System.Type:GetType (string,bool)
in <0x0001d> 00 System.Web.Configuration.HandlerItem:DoValidation ()
in <0x0008e> 00 System.Web.Configuration.HandlerItem:.ctor (string,string,string,bool)
in <0x00402> 00 System.Web.Configuration.HttpHandlersSectionHandler:Create (object,object,System.Xml.XmlNode)
in <0x00159> 00 System.Configuration.ConfigurationData:GetConfig (string)
in <0x00025> 00 System.Configuration.DefaultConfig:GetConfig (string)
in <0x0003d> 00 System.Configuration.ConfigurationSettings:GetConfig (string)
in <0x0000d> 00 System.Web.HttpContext:GetAppConfig (string)
in <0x00027> 00 System.Web.HttpApplication:CreateHttpHandler (System.Web.HttpContext,string,string,string)
in <0x0011f> 00 .CreateHandlerState:Execute ()
in <0x0006f> 00 .StateMachine:ExecuteState (IStateHandler,bool&)
-----
The code for the example is from here :
http://samples.gotdotnet.com/quickstart/aspplus/default.aspx?url=%2fquickstart%2faspplus%2fdoc%2fhttphandlers.aspx
Any ideas?
Thanks,
Cezar
//Handler.cs
----
using System.Web;
namespace Acme {
public class SimpleHandler : IHttpHandler {
public void ProcessRequest(HttpContext context) {
context.Response.Write("Hello World!");
}
public bool IsReusable {
get {
return true;
}
}
}
}
-----
//web.config
---
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="SimpleHandler.aspx" type="Acme.SimpleHandler,
SimpleHandler" />
</httpHandlers>
</system.web>
</configuration>
----
More information about the Mono-devel-list
mailing list