Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Async Exception with WCF - Silverlight

Async Exception with WCF - Silverlight

Scheduled Pinned Locked Moved WCF and WF
wcfhelpcsharpwpfwindows-admin
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 4584312
    wrote on last edited by
    #1

    I have developed a Workflow and published it as WCF webservice on IIS. The ServiceReference.ClientConfig contains the following binding for each webservice:

            <customBinding>
       <binding name="CustomBinding\_IListValue">
                    <binaryMessageEncoding />
                    <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
                </binding>
    

    ....
    </customBinding>

        </bindings>
    
        <client>
            <endpoint address="http://IPAddress/MyService/GetListValue.svc"
                binding="customBinding" bindingConfiguration="CustomBinding\_IListValue"
                contract="SRListValue.IListValue" name="CustomBinding\_IListValue" />
    

    ....
    </client>

    I then created a Silverlight 3 webapplication that references the published svc webservice. The crossdomain.xml and clientaccesspolicy.xml are in the wwwroot of the webserver. When calling the silverlight webapplication, the call sometimes works perfectly and sometimes give the Async_Exception. We monitored it through Fidler and it sometimes gives the 500 http error that doesn't say much and sometimes it passes through. We have been struggling with this for a week now. Appreciate any help in the matter. Thanks Grace

    M 1 Reply Last reply
    0
    • M Member 4584312

      I have developed a Workflow and published it as WCF webservice on IIS. The ServiceReference.ClientConfig contains the following binding for each webservice:

              &lt;customBinding&gt;
         <binding name="CustomBinding\_IListValue">
                      <binaryMessageEncoding />
                      <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
                  </binding>
      

      ....
      </customBinding>

          </bindings>
      
          <client>
              <endpoint address="http://IPAddress/MyService/GetListValue.svc"
                  binding="customBinding" bindingConfiguration="CustomBinding\_IListValue"
                  contract="SRListValue.IListValue" name="CustomBinding\_IListValue" />
      

      ....
      </client>

      I then created a Silverlight 3 webapplication that references the published svc webservice. The crossdomain.xml and clientaccesspolicy.xml are in the wwwroot of the webserver. When calling the silverlight webapplication, the call sometimes works perfectly and sometimes give the Async_Exception. We monitored it through Fidler and it sometimes gives the 500 http error that doesn't say much and sometimes it passes through. We have been struggling with this for a week now. Appreciate any help in the matter. Thanks Grace

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      I have no experience with WF, but is it possible to run the server or attach to the server process with the debugger? I would think there's an (unhandled) exception occurring on the server...

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      M 1 Reply Last reply
      0
      • M Mark Salsbery

        I have no experience with WF, but is it possible to run the server or attach to the server process with the debugger? I would think there's an (unhandled) exception occurring on the server...

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        M Offline
        M Offline
        Member 4584312
        wrote on last edited by
        #3

        Thanks Mark... But how can I do that? I have actually tried to comment all the code inside the WF functions so they would just do nothing. And still they were giving the Async Exception occasionally ...

        M 1 Reply Last reply
        0
        • M Member 4584312

          Thanks Mark... But how can I do that? I have actually tried to comment all the code inside the WF functions so they would just do nothing. And still they were giving the Async Exception occasionally ...

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Can you post the <system.serviceModel> section of the server side's web.config?

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          M 1 Reply Last reply
          0
          • M Mark Salsbery

            Can you post the <system.serviceModel> section of the server side's web.config?

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            M Offline
            M Offline
            Member 4584312
            wrote on last edited by
            #5

            Here it is:

            <system.serviceModel>
            <bindings>
            <customBinding>
            <binding name="customBinding0">
            <binaryMessageEncoding />
            <httpTransport />
            </binding>
            </customBinding>
            </bindings>
            <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
            <services>

              <service behaviorConfiguration="WcfService.ServiceBehavior" name="MyAPP\_WF\_WCF.WF.Infrastructure.ListValueWF">
                <endpoint address="" binding="customBinding" bindingConfiguration="customBinding0"
                 contract="MyAPP\_WF\_WCF.Interfaces.Infrastructure.IListValue" />
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
                <host>
                  <baseAddresses>
                    <add baseAddress="http://localhost:8731/Design\_Time\_Addresses/MyAPP\_WF\_WCF/WF/Infrastructure/ListValueWF/" />
                  </baseAddresses>
                </host>
              </service>
            
             .....
            
            
            </services>
            <behaviors>
              <serviceBehaviors>
                <behavior name="WcfService.ServiceBehavior">
                  <serviceMetadata httpGetEnabled="true" />
                  <serviceDebug includeExceptionDetailInFaults="false" />
                </behavior>
                <behavior name="MyAPP\_WF\_WCF.Workflow1Behavior">
                  <serviceMetadata httpGetEnabled="true" />
                  <serviceDebug includeExceptionDetailInFaults="true" />
                  <serviceCredentials>
                    <windowsAuthentication includeWindowsGroups="true" allowAnonymousLogons="false" />
                  </serviceCredentials>
                </behavior>
              </serviceBehaviors>
              
            </behaviors>
            

            </system.serviceModel>

            M 1 Reply Last reply
            0
            • M Member 4584312

              Here it is:

              <system.serviceModel>
              <bindings>
              <customBinding>
              <binding name="customBinding0">
              <binaryMessageEncoding />
              <httpTransport />
              </binding>
              </customBinding>
              </bindings>
              <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
              <services>

                <service behaviorConfiguration="WcfService.ServiceBehavior" name="MyAPP\_WF\_WCF.WF.Infrastructure.ListValueWF">
                  <endpoint address="" binding="customBinding" bindingConfiguration="customBinding0"
                   contract="MyAPP\_WF\_WCF.Interfaces.Infrastructure.IListValue" />
                  <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
                  <host>
                    <baseAddresses>
                      <add baseAddress="http://localhost:8731/Design\_Time\_Addresses/MyAPP\_WF\_WCF/WF/Infrastructure/ListValueWF/" />
                    </baseAddresses>
                  </host>
                </service>
              
               .....
              
              
              </services>
              <behaviors>
                <serviceBehaviors>
                  <behavior name="WcfService.ServiceBehavior">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="false" />
                  </behavior>
                  <behavior name="MyAPP\_WF\_WCF.Workflow1Behavior">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="true" />
                    <serviceCredentials>
                      <windowsAuthentication includeWindowsGroups="true" allowAnonymousLogons="false" />
                    </serviceCredentials>
                  </behavior>
                </serviceBehaviors>
                
              </behaviors>
              

              </system.serviceModel>

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              You've only shown one service. If that's the service that is returning an error occasionally: 1) Set the includeExceptionDetailInFaults to true so you get more info with the HTTP 500 response. 2) Based on the baseAddress, it looks like you're already hosting it in the development environment. You should be able to start the service in the debugger!

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              A 2 Replies Last reply
              0
              • M Mark Salsbery

                You've only shown one service. If that's the service that is returning an error occasionally: 1) Set the includeExceptionDetailInFaults to true so you get more info with the HTTP 500 response. 2) Based on the baseAddress, it looks like you're already hosting it in the development environment. You should be able to start the service in the debugger!

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                A Offline
                A Offline
                avnerpeer
                wrote on last edited by
                #7

                Hello Mark , I having the same problem!!! All asinc methods rais an exception , either if they are signed in comment. It started sudenlly. any Ideas?

                1 Reply Last reply
                0
                • M Mark Salsbery

                  You've only shown one service. If that's the service that is returning an error occasionally: 1) Set the includeExceptionDetailInFaults to true so you get more info with the HTTP 500 response. 2) Based on the baseAddress, it looks like you're already hosting it in the development environment. You should be able to start the service in the debugger!

                  Mark Salsbery Microsoft MVP - Visual C++ :java:

                  A Offline
                  A Offline
                  avnerpeer
                  wrote on last edited by
                  #8

                  I have developed a Workflow and published it as WCF webservice on IIS. I then created a Silverlight 3 webapplication that references the published svc webservice. The clientaccesspolicy.xml is in the wwwroot of the webserver. When calling the silverlight webapplication, the call sometimes works perfectly and sometimes give the Async_Exception. We have been struggling with this for a week now. Appreciate any help in the matter. Thanks !

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups