[Mono-aspnet-list] Mono and IHttpHandler
mbrenn
brenn at depon.net
Thu Nov 17 12:19:46 EST 2011
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 = "
Yeah
";
var bytes = Encoding.UTF8.GetBytes(result);
context.Response.Write(result);
}
}
This class gets compiled via .Net to IISHost.dll and is put within the
'bin'-Directory of the webroot.
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?
--
View this message in context: http://mono.1490590.n4.nabble.com/Mono-and-IHttpHandler-tp4080761p4080761.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
More information about the Mono-aspnet-list
mailing list