I'd like to use XSP or better mod_mono within a .Net-Project using the IHttpHandler method.
I have the following class (quite simple:
public class Class1 : IHttpHandler
{
public bool IsReusable
{
get { return false; }
}
public void ProcessRequest(HttpContext context)
{
var result = "<h1>Yeah</h1>";
var bytes = Encoding.UTF8.GetBytes(result);
context.Response.Write(result);
}
}
And the following web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read, Execute, Script">
<add name="Class" path="*" verb="*" type="IISHost.Class1" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
</system.webServer>
<system.web>
<compilation defaultLanguage="c#" />
</system.web>
</configuration>
It is working perfectly within IIS. http://127.0.0.1/test/kfdlsa returns 'Yeah'
Within XSP or mod_mono on Apache, I can create an index.aspx which is parsed and executed perfectly according to .Net-Framework, but it seems to be that the handler is not included within the mod_mono-Framework.
Is using IHttpHandler really implemented within Mono or shall I use another approach for collection all Requests to a certain Host and/or virtual directory.