Windows服务中的Web服务? [英] A web service inside a windows service?

查看:84
本文介绍了Windows服务中的Web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让Windows服务实例化一个Web

服务的类,然后客户可以通过HTTP访问它?


谢谢,


-Mike

Is there a way to have a windows service instantiate a class that is a web
service, which will then be accessible to clients via HTTP?

Thanks,

-Mike

推荐答案

我不认为是网络服务在内部能够完成所有工作。

即,它没有套接字侦听/请求排队代码,它只是

知道如何处理请求一旦交给它。它仍然需要由某种类型的Web服务器(通常是IIS)托管,但您可能需要修改Cassini服务器来创建可能是
在Windows服务中完全独立:

http://www.asp.net/Default.aspx?tabindex=7&tabid=41


-Jason


Michael Riggio写道:
I don''t think a web service is internally capable of doing all the work.
I.e., it doesn''t have the socket listening/request queuing code, it just
knows how to handle a request once one is handed to it. It still needs
to be hosted by some kind of web server, normally IIS, but you may be
able to modify the Cassini server to create something that could be
fully self-contained within a windows service:

http://www.asp.net/Default.aspx?tabindex=7&tabid=41

-Jason

Michael Riggio wrote:
有没有办法让Windows服务实例化一个web
服务的类,那么客户可以通过HTTP访问它吗?

谢谢,

Is there a way to have a windows service instantiate a class that is a web
service, which will then be accessible to clients via HTTP?

Thanks,

-Mike



这是一个很好的开始,感谢您的信息! Cassini看起来很漂亮

直接向前(我正在踩着调试器),虽然它会非常酷,如果它更简单,任何人都可以滚动相对轻松地拿出他们的b $ b自己的解决方案。


谢谢!

Jason DeFontes < JA *** @ defontes.com>在消息中写道

news:uM ************** @ tk2msftngp13.phx.gbl ...
This is a great start, thanks for the information!! Cassini seems pretty
straight forward (I''m stepping through the debugger), though it would be
really cool if it was a bit more simpler such that anyone can roll out their
own solution with relative ease.

Thanks!
"Jason DeFontes" <ja***@defontes.com> wrote in message
news:uM**************@tk2msftngp13.phx.gbl...
我不是认为一个Web服务在内部能够完成所有工作。
即它没有套接字侦听/请求排队代码,它只是知道如何处理一个请求一旦被传递到它。它仍然需要由某种类型的Web服务器(通常是IIS)托管,但是您可能能够修改Cassini服务器以创建可以完全自包含的内容。 Windows服务:

http ://www.asp.net/Default.aspx?tabindex = 7& tabid = 41

-Jason

Michael Riggio写道:
I don''t think a web service is internally capable of doing all the work.
I.e., it doesn''t have the socket listening/request queuing code, it just
knows how to handle a request once one is handed to it. It still needs
to be hosted by some kind of web server, normally IIS, but you may be
able to modify the Cassini server to create something that could be
fully self-contained within a windows service:

http://www.asp.net/Default.aspx?tabindex=7&tabid=41

-Jason

Michael Riggio wrote:
有没有办法让Windows服务实例化一个
web服务的类,然后客户端可以通过HTTP访问它?

谢谢,

-Mike
Is there a way to have a windows service instantiate a class that is a web service, which will then be accessible to clients via HTTP?

Thanks,

-Mike



嗯,我不知道你有多简单'我希望它成为。启动IIS,在wwwroot中删除
Web服务,回家。你是那个想要在Windows服务中运行它的人,当它没有被设计成以这种方式工作时。

你的痛苦是自我的祝你好运。


祝你好运,


-Jason


Michael Riggio写道:
Well, I''m not sure how much simpler you''d want it to be. Start IIS, drop
web service in wwwroot, go home. You''re the one that wants to run it
from inside a Windows service, when it wasn''t designed to work that way.
Your pain is self-inflicted.

Best of luck,

-Jason

Michael Riggio wrote:
这是一个很好的开始,感谢您的信息!!卡西尼似乎非常直接(我正在逐步完成调试器),尽管如果它更简单一些,任何人都可以推出他们自己的解决方案,那将会非常酷相对容易。

谢谢!
Jason DeFontes < JA *** @ defontes.com>在消息中写道
新闻:uM ************** @ tk2msftngp13.phx.gbl ...
This is a great start, thanks for the information!! Cassini seems pretty
straight forward (I''m stepping through the debugger), though it would be
really cool if it was a bit more simpler such that anyone can roll out their
own solution with relative ease.

Thanks!
"Jason DeFontes" <ja***@defontes.com> wrote in message
news:uM**************@tk2msftngp13.phx.gbl...
我不是认为一个Web服务在内部能够完成所有工作。
即它没有套接字侦听/请求排队代码,它只是知道如何处理一个请求一旦被传递到它。它仍然需要由某种类型的Web服务器(通常是IIS)托管,但是您可能能够修改Cassini服务器以创建可以完全自包含的内容。 Windows服务:

http ://www.asp.net/Default.aspx?tabindex = 7& tabid = 41

-Jason

Michael Riggio写道:

I don''t think a web service is internally capable of doing all the work.
I.e., it doesn''t have the socket listening/request queuing code, it just
knows how to handle a request once one is handed to it. It still needs
to be hosted by some kind of web server, normally IIS, but you may be
able to modify the Cassini server to create something that could be
fully self-contained within a windows service:

http://www.asp.net/Default.aspx?tabindex=7&tabid=41

-Jason

Michael Riggio wrote:

有没有办法让Windows服务实例化一个
web
服务的类,然后客户端可以通过HTTP访问它?

谢谢,

-Mike
Is there a way to have a windows service instantiate a class that is a
web
service, which will then be accessible to clients via HTTP?

Thanks,

-Mike




这篇关于Windows服务中的Web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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