[英]Any small embeddable .Net web server suitable for service status pages?
Is there a simple way, perhaps using the standard libraries, to serve a webpage from my windows service? 是否有一种简单的方法(也许使用标准库)通过Windows服务来提供网页?
I'm not looking for anything fancy I'd just like to serve status/control pages for some of my windows services but don't want to rewrite them as web applications. 我并不是想为我的某些Windows服务提供状态/控制页面,而是不想将它们重写为Web应用程序。
HttpListener is your friend, although making a reservation in the HTTP pipeline for non-admin accounts (ie service accounts) is a bit of a pain. HttpListener是您的朋友,尽管在HTTP管道中为非管理员帐户(即服务帐户) 进行保留有点麻烦。 There's a codeplex project that you can hack into a custom action on your service installer.
有一个Codeplex项目,您可以破解服务安装程序上的自定义操作。
What about Cassini which used to come with the .NET development framework? NET开发框架附带的Cassini呢?
http://www.asp.net/downloads/archived-v11/cassini http://www.asp.net/downloads/archived-v11/cassini
You could always check out the code for Cassini. 您总是可以签出Cassini的代码。 It was written for .net 1.1, but I'm sure porting would be easy enough:
它是为.net 1.1编写的,但是我敢肯定移植会很容易:
http://www.asp.net/downloads/archived-v11/cassini http://www.asp.net/downloads/archived-v11/cassini
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.