这将是一个虚拟问题,但是:
当我在vs 2012中创建一个WCF服务库时,在app.config中我可以找到有关该服务的信息,如下所示。
<system.serviceModel>
<services>
<service name="WcfServiceLibrary1.Service1">
<host>
<baseAddresses>
<add baseAddress = "http://localhost:8733/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="basicHttpBinding" contract="WcfServiceLibrary1.IService1">
但是当我创建一个azure wcf项目(托管在webrole中)时,我在web.config中找不到关于此的任何信息。我在哪里可以找到它们?线路在哪里开始服务?
感谢您的回答,对不起我的英语。
Ť
答案 0 :(得分:0)
查看位于您创建的WCFWebRole根目录中的web.config。
答案 1 :(得分:0)
可能应该像在Guidance for Using WCF in Windows Azure中一样:
<ServiceDefinition name="MyService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<WebRole name="WebRole1">
…
<Endpoints>
<InputEndpoint name="HttpIn" protocol="http" port="80" localPort="80" />
</Endpoints>
</WebRole>
…
</ServiceDefinition>