繁体   English   中英

无法使用wcfTestClient.exe打开svc文件

[英]Cannot open svc file with wcfTestClient.exe

我刚刚在我的网站上添加了wcf服务。 web.config看起来像这样:

<system.serviceModel>
<services>
  <service name="Realstuf.Service">

    <host>
      <baseAddresses>
        <add baseAddress = "http://ismyrealstuff/Services/" />
      </baseAddresses>
    </host>

    <!-- Service Endpoints -->
    <endpoint address ="http://ismyrealstuff/Services/Service.svc" binding="wsHttpBinding" contract="Realstuf.IService" behaviorConfiguration="FirstServiceBehaviour"/>

    <!-- Metadata Endpoints -->
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  </service>
</services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="FirstServiceBehaviour">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>

添加了一个svc文件,并且在app_code目录中添加了service.cs和Iservice.cs文件。 找不到Assemblyinfo.cs文件。

当我尝试在wcftestclient中打开svc文件时,出现“无法添加服务”错误。 错误详细信息说:

错误:无法读取D:\\ Projects \\ IsMyRealStuf \\ IsMyRealStuffWeb \\ Services \\ Service.svc。 无法将文件D:\\ Projects \\ IsMyRealStuf \\ IsMyRealStuffWeb \\ Services \\ Service.svc作为程序集加载。 检查FusionLogs以获取更多信息。 无法加载文件或程序集'file:/// D:\\ Projects \\ IsMyRealStuf \\ IsMyRealStuffWeb \\ Services \\ Service.svc'或其依赖项之一。 该模块应包含程序集清单。

如果我添加任何assemblyinfo.cs文件,是否可以解决此问题? 那如何?

http://ismyrealstuff/Services/Service.svc添加为服务,而不是磁盘上的文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM