[Mono-aspnet-list] Mono and IHttpHandler

Kornél Pál kornelpal at gmail.com
Fri Nov 18 14:44:33 EST 2011


Hi,

You should use "Classic" (non-Integrated) mode config (system.web rather 
than system.webServer). You can try it in IIS as well in Classic 
pipeline mode.

You also will have to either map all requests to mono or just "Class" in 
Apache configuration in order to make this work.

Kornel

mbrenn wrote:
> 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.
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>


More information about the Mono-aspnet-list mailing list