none
503: Service Unavailable; NotFound; Accessing WCF with Silverlight pollingDuplex

    Question

  • Hi,

    I try to solve this for two days now, some issues I could solve by my own, but now I need help.

    When starting my Silverlight app all works fine. But at some points there is an Communication Exception thrown with the Error "NotFound". When I am looking up this request in Firebug it says "503: Service Unavailable".

    What could this possibly be? Or is it normal behaviour, that sometimes the service is just anavailable and I have to run the request again? Note: return type is a List<MyClass> and MyClass ist marked with [DataContract] and the properties with [DataMember]

    My web.config:

    <?xml version="1.0" encoding="utf-8"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->
    <configuration>
      <appSettings>
        <!-- some things -->
      </appSettings>
      <system.web>
        <compilation debug="true" />
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
        <!-- •Überprüfen Sie die Einstellungen für "configuration/system.webServer/security/requestFiltering/hiddenSegments" in der Datei "applicationhost.config" oder "web.config".-->
      </system.web>
      <system.webServer>
        <security>
          <requestFiltering>
            <hiddenSegments />
          </requestFiltering>
        </security>
      </system.webServer>
    
      <system.serviceModel>
        <extensions>
          <bindingExtensions>
            <add name="pollingDuplex" type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement, System.ServiceModel.PollingDuplex, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          </bindingExtensions>
        </extensions>
        <behaviors>
          <serviceBehaviors>
            <behavior name="">
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <bindings>
          <pollingDuplex>
            <binding name="myPollingDuplex" duplexMode="MultipleMessagesPerPoll" />
          </pollingDuplex>
        </bindings>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
        <services>
          <service name="MedianesSL4.Web.MAService">
            <endpoint address=""
                      binding="pollingDuplex"
                      bindingConfiguration="myPollingDuplex"
                      contract="MedianesSL4.Web.MAService" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
          </service>
        </services>
      </system.serviceModel>
    </configuration>
    Thursday, March 22, 2012 3:04 PM

Answers

  • Hi kevkong,

    For those of you running into the same problem.

    1. create proxy

    2. call

    3. close proxy in callback

    4. create proxy

    5. call

    6. close proxy in callback

    7. ...

    runs into heavy problems if you would like to make a lot of calls at the same time. The way to go is:

    1. create proxy

    2. open proxy

    3. call

    4. call

    5. ...

    6. close proxy

    The 503 Service Unavailable error is a server side error. So  the problem is on the website's server. There are many reasons which will lead to this issue.  Form your description, the exception will be throwed sometimes. That means that your configuration is correct. This issue will happen when the server is too busy. You can try to follow this thread's advice and reinstall the server again.

    Wednesday, March 28, 2012 10:57 PM

All replies

  • Kevkong

    This is an old thread so that just try to help.

    If you run the app under iis you should enable asp.net so that the service will availabel.

    Sunday, March 25, 2012 11:28 AM
  • For those of you running into the same problem.

    1. create proxy

    2. call

    3. close proxy in callback

    4. create proxy

    5. call

    6. close proxy in callback

    7. ...

    runs into heavy problems if you would like to make a lot of calls at the same time. The way to go is:

    1. create proxy

    2. open proxy

    3. call

    4. call

    5. ...

    6. close proxy

    Monday, March 26, 2012 6:13 AM
  • Hi kevkong,

    For those of you running into the same problem.

    1. create proxy

    2. call

    3. close proxy in callback

    4. create proxy

    5. call

    6. close proxy in callback

    7. ...

    runs into heavy problems if you would like to make a lot of calls at the same time. The way to go is:

    1. create proxy

    2. open proxy

    3. call

    4. call

    5. ...

    6. close proxy

    The 503 Service Unavailable error is a server side error. So  the problem is on the website's server. There are many reasons which will lead to this issue.  Form your description, the exception will be throwed sometimes. That means that your configuration is correct. This issue will happen when the server is too busy. You can try to follow this thread's advice and reinstall the server again.

    Wednesday, March 28, 2012 10:57 PM