0
如何在安裝期間評論配置文件的元素? 也就是說我將WCF服務安裝到IIS。如果IIS沒有https協議綁定,我需要在Web.config中評論https端點。 否則不要評論此端點。如果IIS服務器不支持它們,請不要包含https端點
<service name="MyServer.MyDataAccessRESTService" behaviorConfiguration="MyServer.MyDataAccessRESTServiceBehavior">
<endpoint binding="webHttpBinding" contract="MyServer.IMyDataAccessRESTService"
bindingConfiguration="webHttpBinding0" behaviorConfiguration="MyDataAccessRESTServiceBehavior"
address="http://localhost/svc2Web/svc2rest.svc"></endpoint>
<endpoint binding="webHttpBinding" contract="MyServer.IMyDataAccessRESTService"
bindingConfiguration="webHttpBinding1" behaviorConfiguration="MyDataAccessRESTServiceBehavior"
address="https://localhost/svc2Web/svc2rest.svc"></endpoint>
</service>
Thnx,作爲一種方式..有一個缺點。我不知道安裝程序中的確切字符串。我只知道我需要的http或/和https。該字符串包含更多元素... – Oleg 2012-02-10 13:51:03