views:

74

answers:

3

We have a desktop client application and recent customer requests indicate that they would like to have some dynamic HTML content served and displayed by the application.

We are considering hosting a simple ASP.NET application in a local process, accessible only from the local machine (similar to the ASP.NET development web server used when debugging from Visual Studio).

How can we run an ASP.NET application locally without IIS? IIS is not an option because most client machines will not have it installed.

Is there a leightweight ASP.NET web server that could run locally similar to the development web server that VS is using?

I have found some information about "Cassini". Is this suitable for production use? Can it handle ASP.NET MVC? Are there any alternatives we should consider?

+2  A: 

I have not used it myself, but you can try the mono XPS server.

It is a stand alone webserver.

The easiest way to start XSP is to run it from within the root directory of your application. It will serve requests on port 8080. Place additional assemblies in the bin directory.

Cassini is in fact also a good option - it is the development web server that comes with visual studio (so widely distributed, used and tested) and is also used by the open source ScrewTurnWiki. See wikipedia.


In regards to your "only locally" requirement - a web server will serve any request made to the right port. In order to limit accessibility, you should use a firewall that will block any external requests.

Oded
A: 

You might consider using WCF to host a service on the local machine that can serve the data without having to host a full blown web server.

If you do this, WCF allows you to expose the service with multiple endpoints and make it available through HTTP, TCP, or Namepipes. Namepipes would restrict traffic to only the local machine.

Hector
Could you please elaborate how to process ASP.NET pages (serving HTML) with WCF?
Marek
A WCF service could return any kind of data including binary or text. You would be in charge of writing the code to produce the text that the consumer expects (HTML in your case.) Having said that I guess I should have asked you to clarify the question as I am not sure I understand if you need to *render* HTML on your app or *serve* HTML from your app (or both?)
Hector
Both - the (existing) desktop application would need to have a HTML interface for certain parts of the UI. The HTML should be rendered dynamically, thus served by a custom component within the application. While I see how WCF could return HTML strings, I would prefer ASP.NET support and a standard HTTP protocol implementation, so WCF is not an option here.
Marek
A: 

I have also tried IIS Express. It works great with ASP.NET MVC. Right now it is available only with Web Matrix, but installing web matrix is easy.

virtualmic