我是 WCF 的新手
为什么每次我运行此服务时,它都在不同的地址上运行,而不是在我写的地址上运行?
如果这很容易,我很抱歉:(
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="PBServiceBehavior" name="PhoneBookService.PbService">
<endpoint name="PbHttpEndpoint"
address="http://localhost:9001/PhonebookService"
binding="basicHttpBinding"
contract="PhoneBookService.IPbService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="PBServiceBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>