我一直在IIS中托管的WCF服务收到404错误。该服务是双工服务。我可以在Web浏览器中访问.svc。但是,当客户端尝试登录时,它会因404 Not Found错误而超时。 我的web.config片段如下所示:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<trust level="Full"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" aspNetCompatibilityEnabled="false">
<baseAddressPrefixFilters>
<add prefix="http://seeinstacksproductions.com/"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
<bindings>
<wsDualHttpBinding>
<binding name="dualHttp" receiveTimeout="00:30:00" maxReceivedMessageSize="1048576" sendTimeout="00:01:00">
<readerQuotas maxStringContentLength="99999999" maxArrayLength="9999999" maxBytesPerRead="999999"/>
<security mode="None"/>
</binding>
</wsDualHttpBinding>
</bindings>
<services>
<service name="OLII.Apps.Services.Automation.AutomatorService.WCFAutomatorService">
<host>
<baseAddresses>
<add baseAddress="http://seeinstacksproductions.com/"/>
</baseAddresses>
</host>
<endpoint address="Automator.svc" bindingConfiguration="dualHttp" binding="wsDualHttpBinding" contract="OLII.Apps.Services.ProxyClients.AutomatorServiceProxyClient.IWCFAutomatorService"/>
</service>
</services>
</system.serviceModel>
我提出了我的应用程序发出的请求,它看起来像这样:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</a:Action>
<a:MessageID>urn:uuid:f15d936e-e893-46cd-ae6a-43186cda91ef</a:MessageID>
<a:ReplyTo>
<a:Address>http://my-server/Temporary_Listen_Addresses/595b57ae-f2a0-4522-b636-1075e326c689/3a866e3c-c707-4fe8-b211-208affa1092a</a:Address>
<a:ReferenceParameters>
<ChannelInstance xmlns="http://schemas.microsoft.com/ws/2005/02/duplex">6</ChannelInstance>
</a:ReferenceParameters>
</a:ReplyTo>
<a:To s:mustUnderstand="1">http://seeinstacksproductions.com/Automator.svc</a:To>
</s:Header>
<s:Body>
<CreateSequence xmlns="http://schemas.xmlsoap.org/ws/2005/02/rm">
<AcksTo>
<a:Address>http://my-server/Temporary_Listen_Addresses/595b57ae-f2a0-4522-b636-1075e326c689/3a866e3c-c707-4fe8-b211-208affa1092a</a:Address>
<a:ReferenceParameters>
<ChannelInstance xmlns="http://schemas.microsoft.com/ws/2005/02/duplex">6</ChannelInstance>
</a:ReferenceParameters>
</AcksTo>
<Offer>
<Identifier>urn:uuid:a2d993bb-1694-4373-a5fa-48f5ec01185b</Identifier>
</Offer>
</CreateSequence>
</s:Body>
</s:Envelope>
由于
答案 0 :(得分:0)
在出现wcf双工通信问题时,您必须描述网络拓扑, 您的客户端是否与您的服务器位于同一LAN中,或者他是否通过Internet访问服务器,在某些网络方案中,无法使用双工通信。
干杯,
吉拉德