[Mono-dev] CreateInstanceAndUnwrap crashing

Justin Tulloss tulloss2 at uiuc.edu
Thu Dec 21 17:30:15 EST 2006


Hello,

First off, I'm new to Mono. In fact, the whole managed code paradigm
is pretty new to me, and I'm still getting used to how it all works.

I found some example code here:
http://msdn.microsoft.com/msdnmag/issues/04/12/ServiceStation/#S4 that
does exactly what I've been looking to do. That is, it allows a
desktop application to host web services without a web server.
Unfortunately, the code doesn't run in Mono. I recompiled it
successfully and got further, but every example dies in
CreateInstanceAndUnwrap. The specific call that eventually causes all
this is:
HttpListenerWrapper lw =
(HttpListenerWrapper)ApplicationHost.CreateApplicationHost(
                typeof(HttpListenerWrapper), "/",
Directory.GetCurrentDirectory());

Where HttpListenerWrapper is a class that is defined by the author of
the article and wraps around the HttpListener and HttpListenerContext
classes.

Is this type of behavior not supported by mono? It seems that it is
since I looked through the XSP code and it appears to do a similar
task. Any help would be appreciated.

Justin



More information about the Mono-devel-list mailing list