Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to create a "Self-hosted" Web Site in .Net? [closed]

Tags:

c#

.net

iis

Similar to WCF Self Hosting.

Is there a way to create a website that is "self-hosted" within a console application or dll?

Probably the wrong way to ask this question, but what i'd like to do is use this website to split results as web pages without creating the website within IIS.

Thanks.

like image 919
Beta033 Avatar asked Oct 06 '10 18:10

Beta033


People also ask

How can I host a website without IIS?

It is easy to run your asp.net web application without installing any web server. For running your application without IIS you have to use Cassini Desktop Adapter. Now your application is running without IIS It also support VWG application.

Is .NET Core self-hosted?

Yes. In fact, all ASP.NET Core applications are self-hosted. Even in production, IIS/Nginx/Apache are a reverse proxy for the self-hosted application. In a reasonably standard Program.

Can an ASP.NET Core Web API be self-hosted?

ASP.NET Web API does not require IIS. You can self-host a web API in your own host process. New applications should use OWIN to self-host Web API. See Use OWIN to Self-Host ASP.NET Web API 2.

Can you self host a website for free?

Wix. Wix is another fully-hosted website builder that offers free website hosting. Like most free hosting services, it is supported by displaying ads and Wix.com branding on your free website. You can get rid of it by upgrading to their paid plans.


2 Answers

A very basic HTTP server is implemented by the HttpListener Class in the .NET Framework.

If you need something more powerful, have a look at Microsoft Cassini, a simple HTTP server written in C# licensed under Ms-PL. It's basically a demo how to host the ASP.NET runtime.

like image 196
dtb Avatar answered Sep 22 '22 23:09

dtb


If you have visual studio, here is an article I read a while back on how to basically snatch the VS built-in web server and use it for your own purposes:

http://www.codeproject.com/KB/aspnet/LightIIS.aspx

like image 36
Mike Cheel Avatar answered Sep 23 '22 23:09

Mike Cheel