title: How can I use Mono.WebServer (XSP) to run my mono ASP MVC application?
body: <p>I've have been using Mono Develop 2.8 on a to make an ASP MVC application.</p>
  
  <p>The application works nicely in Mono Develop and when I 'Run' or 'Debug', from the IDE, it starts a local server to run my code.</p>
  
  <p>Now I am at a point where I want to run my ASP MVC application outside of Mono Develop.</p>
  
  <p>The first thing I have been trying to do it just mimic the steps Mono Develop takes to get this running.</p>
  
  <p>I found the Mono.WebServer namespace and also the following article from 2005:</p>
  
  <p><a href="http://weblogs.asp.net/britchie/archive/2005/07/25/420512.aspx" rel="noreferrer">http://weblogs.asp.net/britchie/archive/2005/07/25/420512.aspx</a></p>
  
  <p>documenting how to run your own XPS server.</p>
  
  <pre><code>class MainClass
  {
      public static void Main (string[] args)
      {
          int Port=8080;
  
          string path="\\TempDeploy";
  
          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();
      }
  }
  </code></pre>
  
  <p>I have tried this code and it generate a few warnings about using obsolete parts of the Mono.WebServer dll.  When I run it and navigate 127.0.0.1:8080 I can see that something is running, I get 404 errors.  The data in I have in the /TempDeploy folder is the result of running the Mono Develop 'Deploy To The Web' option to that directory.  It contains the standard ASP MVC structure:</p>
  
  <pre><code>/TempDeploy/
      /bin/
      /Content/
      /Scripts/
      /Views/
  </code></pre>
  
  <p>What changes do I need to make to the above code to get it run an ASP MVC application.  I assume it needs to be pointed to the dlls in the bin directory, but I don't know what calls to make to set it up properly.</p>
  
  <p>Any help would be greatly appreciated. </p>
  
  <p>Thanks.</p>