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
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
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.
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