简体   繁体   English

在生产环境中部署WCF服务

[英]Deploying WCF services in a production environment

The web provides an abundance of tutorials for developing and testing WCF services along with client applications that reference them all within the Visual Studio IDE. Web提供了大量用于开发和测试WCF服务的教程,以及在Visual Studio IDE中引用所有服务的客户端应用程序。

However, in a production setting, one needs to deploy services and clients on various hosts where Visual Studio is not available, and the clients need to be configured to know the URL of the whatever service they expect to use. 但是,在生产环境中,需要在不可用Visual Studio的各种主机上部署服务和客户端,并且需要将客户端配置为知道他们希望使用的任何服务的URL。

Can anyone provide some instructions for this kind of deployment, or link me to a web page that contains the information that I want? 谁能为这种部署提供一些说明,或者将我链接到包含所需信息的网页?

You can supply the URL needed by a client in a configuration file and have that loaded on startup. 您可以在配置文件中提供客户端所需的URL,并在启动时加载该URL。 That will allow you to easily change which URL is used by any client. 这将使您轻松更改任何客户端使用的URL。

As long as you will know when you launch your client where the services will be you can define all of the configuration in your app/web.config file. 只要您知道启动客户端服务的位置,就可以在app / web.config文件中定义所有配置。 This should help get you started 应该可以帮助您入门

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM