哪个进程托管在IIS中部署的WCF服务 [英] Which process host the WCF service that is deployed in IIS

查看:74
本文介绍了哪个进程托管在IIS中部署的WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IIS中托管了WCF服务。我希望我的服务从配置文件中读取一些配置。当我在IIS中托管服务时,我需要更新配置文件

I have WCF service hosted in IIS. I want my service to read some configuration from config file. When i host the service in IIS which config file i need to Update

推荐答案

正如您提到的那样,您已经开发了WCF服务器,该服务也有web.config文件您可以从中读取您的配置文件,它仅适用于您的应用程序,其他应用程序无法使用它。或者您也可以在项目中添加App.Config文件,它也是一个用于存储配置的配置文件。
As you mention that you have develop WCF serverice, that service also have web.config file its your configuration file you can read from it, its separate for your application only, other application can't use it. Or also you can add App.Config file in your project its also an configuration file to be used for storing configurations.


有关您的WCF的所有配置都在 web中.config

是的,几乎不可能以编程方式从该文件中读取。但是,是的,如果您已经自己实现了它,那么您不必担心。



如果您要将此WCF的引用添加到某个客户端(即控制台应用程序,表单应用程序,网站等...),同时在那里创建一个文件,它保存客户端的所有WCF配置,称为 app.config



您似乎已经在IIS上托管了WCF,您可以直接从中读取配置。 :)



-KR
All the configuration about your WCF goes in web.config.
And yeah, it is almost impossible to read from that file programmatically. But yes, if you have implemented it by yourself then you don't have to worry about that.

If you're adding the reference of this WCF to some client (i.e console app, form app, web site etc...), one file is created over there as well, which holds all of the configuration of WCF on client side, known as app.config.

It seems that you have already hosted WCF on IIS, you can directly read the configuration from it. :)

-KR


我更新了web.config文件。它奏效了。
I updated the web.config file. It worked.


这篇关于哪个进程托管在IIS中部署的WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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