Retry web service call if authentication failure requires re-login
        Posted  
        
            by Pete
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Pete
        
        
        
        Published on 2010-03-26T01:29:04Z
        Indexed on 
            2010/03/26
            1:33 UTC
        
        
        Read the original article
        Hit count: 549
        
I'm consuming a web service from C#, and the web service requires a login call and then uses cookie sessions. The web service will time out sessions after a certain timeframe, after which the client will have to re-login. I'd like to find a way to automatically catch the soap fault the service sends back in this scenario, and handle it by re-logging in and then retrying the previously attempted call.
I would prefer to do this somehow automatically for all the web service methods in question, rather than having to manually wrap the calls with the retry logic.
Suggestions?
© Stack Overflow or respective owner