Search code examples
c#silverlighttimeoutsilverlight-5.0wcf-ria-services

Silverlight DomainService Timeout


I have a silverlight 5 project that invokes a method form my business logic layer (a DomainService class), this invoke method returns a string. My problem is that running this method may take couple of hours to perform and I need a way to avoid RIA timeouts. Any ideas?


Solution

  • It would be wiser to implement the call in two parts.

    1. Invoke the method to start the process, returning a token to track the status
    2. Periodically (every 5 mins?) poll another method submitting the token and returning a status

    This is far superior to leaving a connection open and waiting.

    Another possibility is to use something like SignalR to do the polling for you. When the server completes, you would expect to receive the result almost immediately.