嵌入一​​个轻量级的Web服务器到.NET应用程序(node.js的)? [英] Embedding a lightweight web server into a .net application (node.js)?

查看:225
本文介绍了嵌入一​​个轻量级的Web服务器到.NET应用程序(node.js的)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经与Awesomium建立在.NET中的一个项目,它需要使用Flash。闪存引发安全错误试图访问本地内容(视频播放)和溶液(S)Awesomium报价还没有被移植到.NET包装呢。我不知道是否有一个相当直接的方式,包括在应用程序运行时的Web服务器,我可以只挑一些任意的端口,并创建一个本地主机服务器时,应用程序运行,并指出我的Awesomium的浏览器存在。

I have a project built with Awesomium built in .NET and it requires the use of Flash. Flash throws security errors trying to access local content (video player) and the solution(s) Awesomium offers have not been ported to the .NET wrapper yet. I'm wondering if there is a fairly straight-forward way to include a run-time web server in the application where I can just pick some arbitrary port and create a localhost server when the application runs and point my Awesomium browser there.

任何想法?

推荐答案

NHttp 提供了请求解析HTTP服务器,但你要滚你自己的反应。还有皮艇和框架本身的HttpListener

NHttp provides an HTTP server with request parsing, but you have to roll your own responses. There's also Kayak, and the framework's own HttpListener.

南希是一个完整的MVC框架,支持ASP.NET剃刀语法,并有大量的配置和可扩展性选项。有一个自主机包装上的NuGet 可用。

Nancy is a full MVC framework, supports the ASP.NET Razor syntax, and has lots of options for configuration and extensibility. There's a self-host package available on nuget.

如果你只需要满足了SWF文件和一些JSON数据,第一组很可能会容易集成 - 如果你需要渲染完整网页,我会建议南希

If you just need to serve up a SWF file and some JSON data, the first set would probably be simpler to integrate -- if you need to render full web pages, I would recommend Nancy.

这篇关于嵌入一​​个轻量级的Web服务器到.NET应用程序(node.js的)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆