[英]Hosting WCF on IIS
I have problem with hosting WCF Application
service on IIS
. 我在IIS
上托管WCF Application
服务时IIS
。 The service is working inside solution with other project by Add Service Reference
, but when i want host it on IIS
I get error when I open Service.svc
from IIS
. 该服务正在通过“ Add Service Reference
与其他项目一起在解决方案内部运行,但是当我想将其托管在IIS
时,当我从IIS
打开Service.svc
时出现错误。
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
My Web.config 我的Web.config
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name ="svcbh">
<serviceMetadata httpGetEnabled="False"/>
<serviceDebug includeExceptionDetailInFaults="False"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="WCFApplication.Service1" behaviorConfiguration="svcbh">
<host>
<baseAddresses>
<add baseAddress="http://localhost:9000/Service1/"/>
</baseAddresses>
</host>
<endpoint name="duplexendpoint"
address=""
binding="wsDualHttpBinding"
contract="WCFApplication.IService1"/>
<endpoint name="MetaDataTcpEndpoint"
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
What can be the problem ? 可能是什么问题?
It could be that you have multiple versions of the .NET Framework installed on the server. 可能是您在服务器上安装了多个版本的.NET Framework。 See https://msdn.microsoft.com/en-us/library/hh169179(v=nav.90).aspx and https://support.microsoft.com/en-us/kb/2015129 请参阅https://msdn.microsoft.com/zh-CN/library/hh169179(v=nav.90).aspx和https://support.microsoft.com/zh-CN/kb/2015129
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.