[英]Cannot open svc file with wcfTestClient.exe
I just added wcf service to my website. 我刚刚在我的网站上添加了wcf服务。 web.config look like this:
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>
A svc file is added and service.cs and Iservice.cs files are added in app_code directory. 添加了一个svc文件,并且在app_code目录中添加了service.cs和Iservice.cs文件。 No Assemblyinfo.cs file is found.
找不到Assemblyinfo.cs文件。
When I tried to open svc file in wcftestclient "Failed to add service" error has generated. 当我尝试在wcftestclient中打开svc文件时,出现“无法添加服务”错误。 The Error detail says:
错误详细信息说:
Error: Cannot read D:\\Projects\\IsMyRealStuf\\IsMyRealStuffWeb\\Services\\Service.svc.
错误:无法读取D:\\ Projects \\ IsMyRealStuf \\ IsMyRealStuffWeb \\ Services \\ Service.svc。 Cannot load file D:\\Projects\\IsMyRealStuf\\IsMyRealStuffWeb\\Services\\Service.svc as an Assembly.
无法将文件D:\\ Projects \\ IsMyRealStuf \\ IsMyRealStuffWeb \\ Services \\ Service.svc作为程序集加载。 Check the FusionLogs for more Information.
检查FusionLogs以获取更多信息。 Could not load file or assembly 'file:///D:\\Projects\\IsMyRealStuf\\IsMyRealStuffWeb\\Services\\Service.svc' or one of its dependencies.
无法加载文件或程序集'file:/// D:\\ Projects \\ IsMyRealStuf \\ IsMyRealStuffWeb \\ Services \\ Service.svc'或其依赖项之一。 The module was expected to contain an assembly manifest.
该模块应包含程序集清单。
If I add any assemblyinfo.cs file is it solution for this? 如果我添加任何assemblyinfo.cs文件,是否可以解决此问题? then How ?
那如何?
将http://ismyrealstuff/Services/Service.svc
添加为服务,而不是磁盘上的文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.