开发者

Hosting Serving Web Pages on Windows In Process

开发者 https://www.devze.com 2023-04-07 10:04 出处:网络
I am currently writing a web based front end for some proprietary server software. The server is based loosely around MEF components written as seaparate assemblies which serve as modules. The web bas

I am currently writing a web based front end for some proprietary server software. The server is based loosely around MEF components written as seaparate assemblies which serve as modules. The web based front end will have its pages served up as a part of one of the modules and it is desirable that it run "in process" so that fai开发者_Python百科lure of the module does not jeopardize the entire server.

I am working through the pros and cons of different approaches for architecting the front end. I have the following as options:

  1. Serve up HTML pages and process commands from a WCF Restful service. Use a WebServiceHost that starts up when a module is initialized.

  2. Use IIS 7.5 Express to set up a web server for a specific directory.

I have #1 prototyped but the downside is that I would have to do a lot of infrastructure code for processing URLs, generating templates and so on. Right now I'm serving up the pages as embedded resources. I don't have the ability to leverage things like ASP.NET MVC.

I am curious about #2 because although IIS represents a big dependency, all the goodness of ASP.NET MVC and other Microsoft infrastructure (e.g. Razor) is readily available.

My questions:

  1. Are there any drawbacks to running IIS Express in process?

  2. What are the pitfalls of my initial approach, running a WCF RESTful web service.

  3. Are there any other lightweight webserver containers I can take advantage of that have the flexibility of ASP.NET for template driven pages and database interaction?

  4. Any additional insight/experiences if you've tried something similar.


If each module will have its own "web server" you could use an OpenRasta Server within each module to create the restful endpoints.

With multiple endpoints though, I suppose you will have to configure multiple port numbers which may have implications with firewall if this is an internet facing application.

Brian

0

精彩评论

暂无评论...
验证码 换一张
取 消