title: Can I start ASP.NET MVC server from code
body: <p>I wrote an ASP.NET MVC3 site (it contains datamodel, controllers and views). But I want to start hosting this site from code, not using IIS.<br>
  I mean, for example, Console application like this:</p>
  
  <pre><code>int Main(string[] argv)
  {
      Console.WriteLine("starting web application");
      var webStarter = new SomeWebServerStartingClass(typeof(MvcApplication), 80);
      webStarter.Run();
      Console.WriteLine("closing web application");
  }
  </code></pre>
  
  <p>At line <code>webStarter.Run();</code> web app is became hosted on 80 port and users can reach it from internet.</p>
  
  <p>ps. I work in a company that develop Computer Vision soft. Our programs realized as windows services. Now we need to create monitoring module in each product. This monitoring module will be asp.net mvc project. I want to start host it from code</p>
  
  <p>pps. I don't want ot use IIS, I just want run this web project from console application. Want to begin receiving requests on specified port just like this webapp was opened in IIS</p>
  
  <p>ppps. Maybe, I want simple package that can host site in code</p>
  
  <p>pppps: I read about self hosting and understood what i want: i want something like ASP.NET Web API Self-Host,  but for MVC application with html controllers</p>
  
  <p>Still sorry for English</p>