有一个工作流服务库作为WFC服务公开。我试图通过web.config文件更改其基址。我已经成功地更改了端点的相对地址,但我也需要更改基址。我怎样才能做到这一点?如何更改WF4.0工作流服务中的基址?
这里是我的配置:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="MyService" behaviorConfiguration="ServiceBehaviors">
<host>
<baseAddresses>
<add baseAddress="http://localhost:777/"/>
</baseAddresses>
</host>
<endpoint address=""
binding="basicHttpBinding"
contract="IMyService" />
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviors">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="false"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<mexHttpBinding>
</mexHttpBinding>
<basicHttpBinding>
<binding>
<security mode="None"/>
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
Thanx!这就是我一直在寻找的。很简单:-) – Dima 2011-04-22 05:17:00