Embedding XSP (Mono.WebServer) in your application

First off, I've contributed some code to the Mono guys to make XSP its own library.  You can get it as part of the 1.1.8 release.  I'm still working on getting a few more additions to the library, but it has all of the basics to get you going.

Download the install from http://www.mono-project.com/Downloads and get the Mono.WebServer.dll in the Mono-1.1.8\lib\mono\1.0 directory.

With that in mind, here's some code:

            int Port=8080;
            string path="\\XSPSamples";
            XSPWebSource websource=new XSPWebSource(IPAddress.Any,Port);
            ApplicationServer WebAppServer=new ApplicationServer(websource);
            //"[[hostname:]port:]VPath:realpath"
            string cmdLine=Port+":/:"+path;
            WebAppServer.AddApplicationsFromCommandLine(cmdLine);
            WebAppServer.Start(true);
            Console.WriteLine("Mono.WebServer running. Press enter to exit...");
            Console.ReadLine();
            WebAppServer.Stop();


The path should point at your ASP.NET files. That should do it...Enjoy!

NOTE: The API is probably not 100% stable, so you might need to "tweak" your application when a new Mono release comes out.
Published Monday, July 25, 2005 10:24 PM by brian_ritchie
Filed under:

Comments

Thursday, August 11, 2005 9:41 AM by Corbin

# re: Embedding XSP (Mono.WebServer) in your application

Very cool Brian!

Hey do you know if your Mono Application Server is public knowledge or supported by the mono guys at all? The reason I ask as I see .NET application server as a missing piece in the .NET market. All we have is IIS and that keeps us on winders.

How complete is the project?
Friday, May 25, 2007 8:23 AM by Gdsffsd

# re: Embedding XSP (Mono.WebServer) in your application

# Make any .NET app a Web Server « Brian Nickel’s Online Journal

Pingback from  Make any .NET app a Web Server « Brian Nickel’s Online Journal

Friday, December 05, 2008 7:28 PM by Semil

# re: Embedding XSP (Mono.WebServer) in your application

<a href= spiritez.com ></a>

Friday, December 26, 2008 7:40 AM by Olgunka-ef

# re: Embedding XSP (Mono.WebServer) in your application

<a href= membres.lycos.fr/maffals >genetic disorters</a>

Saturday, February 28, 2009 11:49 PM by elexx-vy

# re: Embedding XSP (Mono.WebServer) in your application

<a href= adultpersonalsfinder.com >dating</a>

Sunday, March 01, 2009 12:07 AM by Olgunka-bj

# re: Embedding XSP (Mono.WebServer) in your application

<a href= http://adultdatingssfinder.com >singles</a>

Leave a Comment

(required) 
(required) 
(optional)
(required)