【问题标题】:Where is the WCF's ABC in the VS2012' azure WCF sample?VS2012'azure WCF示例中WCF的ABC在哪里?
【发布时间】:2013-04-25 21:30:33
【问题描述】:

这将是一个虚拟问题,但是:

当我在 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 中找不到任何关于此的信息。我在哪里可以找到它们?启动服务的线路在哪里?

谢谢你的回答,对不起我的英语。

T

【问题讨论】:

    标签: c# wcf azure


    【解决方案1】:

    查看位于您创建的 WCFWebRole 根目录中的 web.config。

    【讨论】:

    • 好的。我注意到,有一个配置文件,但它甚至没有 servicemodel 部分。无论如何,谢谢你回答
    【解决方案2】:

    大概应该像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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-24
      • 1970-01-01
      • 2011-01-16
      • 2011-11-07
      • 2017-06-28
      • 1970-01-01
      相关资源
      最近更新 更多