有没有更简单的方法来发布 silverlight & wcf 服务从本地主机到 IIS?
有没有更简单的方法来部署/发布 silverlight & wcf 项目从本地主机环境到 IIS 服务器?
我有一个带有自托管 wcf 服务的 Web 项目,我的 silverlight 应用程序引用了该服务。当我在本地工作时,我将引用地址设置为 htt://localhost:8080/MyService.svc - 当我想将其放在 IIS 服务器上时,我引用它的地址 htt:///MyService.svc 一切正常,即好的。 - 事实上,我也将 clientaccesspolicy 文件放在网站的根目录上,以防万一我需要从我的台式机/笔记本电脑进行测试连接。
每次都得换,有点累。这肯定是很常见的事情吧?是否有某个设置允许我在部署/发布时交换配置? - 与(调试/发布)解决方案配置类似。
任何想法、指示或推荐的做法都将受到高度赞赏。
干杯
Is there a simpler way to deploy/publish silverlight & wcf projects from localhost enviroment to a IIS server?
I have a web project with a self host wcf service which my silverlight application references. When I work locally I set the reference address to htt://localhost:8080/MyService.svc -and when I want to put it on the IIS server, I reference its address htt:///MyService.svc everything works which is good. -and in fact, I event put a clientaccesspolicy file on root of the site too just incase i need to do a test connect from my desktop/laptop.
Its getting a bit tiresome, having to change it each time. Surely this is quite a common thing? Is there a setting somewhere that allows me to swap configuartions when deploying/publishing? -similar to that of the (Debug / Release) solution configuration.
Any thoughts, pointers or recommended practices would be highly appreciated.
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您将其部署到 IIS:为什么不直接使用 Visual Studio 的主机创建一个非自托管的 WCF 服务?新项目--> WCF--> WCF 服务应用程序。
另一方面,为了管理依赖于环境的配置,我喜欢这个东西:
http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx
If you will deploy it to the IIS: why don't you just use the host of visual studio creating a not self hosted wcf service? new project --> WCF --> WCF Service Application.
In the other hand, for managing environments dependent configs I like this thing:
http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx