开发者

404 Errors for WCF Service Hosted In IIS 7

I keep getting 404 errors for a WCF service hosted in IIS. The service is a duplex service. I am able to access the .svc in a web browser. However, when the client attempts to log in, it times out with a 404 Not Found error. A snippet of my web.config looks like this:

<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>

I have fiddlered the request that my application makes and it looks like this:

<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&g开发者_StackOverflow社区t;
    <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>

Thanks


You have to describe your network topology when having a wcf duplex communication problem, Is your client in the same LAN with your server or is he accessing the server over the internet, in some networking scenarios duplex communication can not be used.

Cheers,

Gilad

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜