Open Connection Session issue with OAUTH2 WebServerClient

Skip to first unread message

Veerendra Gadde

Oct 31, 2014, 4:15:11 PM10/31/14
Hi All,

    We are using DotNetOpenAuth for securing our API's and recently came across issue where the connections made through DotNetOpenAuth "WebServerClient" are left open and not getting disposed. This is causing our server to crash frequently as server stops accepting any more request. Please see the below code snippet which we are using while generating  token using OAuthIssuer setup with WebAPI. Can anyone came across similar situation or any known issues which we need to take a look at for resolving this issue?

  private static IAuthorizationState GetAccessToken()

            var authorizationServer = new AuthorizationServerDescription
                TokenEndpoint = new Uri("http://localhost:1961/Issuer"),
                ProtocolVersion = ProtocolVersion.V20

            var client = new WebServerClient(authorizationServer, "http://localhost/");
            client.ClientIdentifier = "zamd";
            client.ClientSecret = "test1243";
            var state = client.GetClientAccessToken(new[] { "http://localhost/" });
            return state;

Thank you!

Reply all
Reply to author
0 new messages