-1

I need a C# (v3.5) web server which able to host the ASP.Net pages. It should support all ASP.net features and mainly threading for request. I don't want to use IIS for some reason.

Any help is appreciated.

-Ganesh

Ganesh
  • 126
  • 2
  • 12
  • 2
    _I don't want to use IIS for some reason._ - perhaps you could share the reason. –  Dec 03 '13 at 06:21
  • Questions asking for code are off topic for SO. As are questions asking for tools or links. Please update the question with the code you've tried and how it has failed. – crthompson Dec 03 '13 at 06:30

2 Answers2

1

Fortunately for you, there are some options available. If your goal is simply to take control of the process so you can provide your own UI or embed it into some other application, using the IIS hostable web core might be a good option (see: self hosting asp.net mvc).

However, Microsoft has also published a specification called "OWIN" (Open Web Interface for .NET), which defines the interfaces expected by the various components in ASP.NET. See the OWIN project page for some implementations you might find useful.

Here's one that seems most relevant to what you're asking: https://github.com/Bobris/Nowin. The description from the GitHub README:

Fast and scalable Owin Web Server in pure .Net 4.5 (it does not use HttpListener)

Current status is usable for testing, not for production, nobody did any security review, you have been warned. On Windows speed is better than NodeJs and in some cases even better than HttpListener.

Features it supports:

  • Http 1.0 and 1.1 clients uses SocketAsyncEventArgs in most optimal way yostrong textu can found on the Internets
  • KeepAlive, untested pipelining, automatic chunked en/decoding of request and response
  • Everything strictly asynchronous and parallel automaticaly using all available cores
  • SSL using .Net SSLstrong text Stream so in theory it should be same secure
  • WebSockets in platform independent way! It buffers data so SignalR is more optimal on wire than current HttpListener on Win8.
  • Tracks currently connection counts and maximum allocated connections and allocates new as needed
  • One connection needs less than 20kb RAM and most of it is reused but never deallocated.
  • By default settings maximum size of request and response headers are 8KB.
  • Published in Nuget for easy use. No dependencies. Other Owin .Net server samples also included. Some parts of these samples source code are modified from Katana project.
Community
  • 1
  • 1
Ben Collins
  • 20,538
  • 18
  • 127
  • 187
1

Yes you can host a asp.net application without IIS. For this you need an HTTP Server. WebAPI has Self Host capabilities built it and you can actually host it in something as simple as a Console application.we can have ASP.NET Web API Services without having to worry about ASP.NET and IIS. For hosting using WebAPI you need to change your code some bit. Here just go though the link which gives demonstration how to host without iss. Hosting Application without IIS

Indranil.Bharambe
  • 1,462
  • 3
  • 14
  • 25