如何处理WCF服务托管的Windows服务的网页? [英] How to handle web pages for a WCF service hosted Windows Service?

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

问题描述

如果您要在.Net Windows服务中托管WCF服务,并且要让远程计算机访问WCF服务,那么该网页将托管在哪里?该网页用于加载Silverlight应用程序(xap文件).使用Visual Studio开发Web服务器排除了远程访问.您可以使用IIS来提供远程访问,而无需让IIS托管WCF服务吗?如果可以使用IIS托管网页,则如何发布WCF服务?

If you are hosting a WCF service in a .Net Windows Service where are the webpages hosted if you want remote machines to access the WCF service? The web pages are used to load a Silverlight app (xap file). Remote access rules out using the visual studio development web server. Can you use IIS to still provide remote access without having IIS host the WCF service? If you can use IIS to host the webpages, how do you go about publishing the WCF service?

推荐答案

您肯定在这里使用了混乱的体系结构. Windows服务和wcf服务不是并且永远不应作为一个服务运行.如果您具有要求解决方案具有Windows Service的功能,请将该解决方案的该部分作为Windows Service解决方案运行.您的Silverlight应用程序应该非常简单地从IIS托管.如果两者都需要数据,请将其存储在某种共享的数据库资源中.
You are certainly using a messed up architecture here. A Windows service and a wcf service are not and should not ever be run as one. If you have functionality that requires the solution to have a windows service, then run that portion of the solution as a windows service solution. Your Silverlight appliation should quite simply hosted from IIS. If there is data that is required by both, store that data in a shared database resource of some kind.


这篇关于如何处理WCF服务托管的Windows服务的网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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