0

I am writing a custom Open Id Client as below

public class CustomOpenIdClient : OpenIdClient
{
 public CustomOpenIdClient() : base("TestOpenId", "`http://localhost:39167/server.aspx`")

{

}

protected override Dictionary<string, string> GetExtraData(IAuthenticationResponse response)
{
    FetchResponse fetchResponse = response.GetExtension<FetchResponse>();

    if (fetchResponse != null)
    {
        var extraData = new Dictionary<string, string>();
        extraData.Add("email", fetchResponse.GetAttributeValue(WellKnownAttributes.Contact.Email));
        extraData.Add("fullname", fetchResponse.GetAttributeValue(WellKnownAttributes.Name.FullName));
        return extraData;
    }

    return null;
}

protected override void OnBeforeSendingAuthenticationRequest(IAuthenticationRequest request)
{
    var fetchRequest = new FetchRequest();
    fetchRequest.Attributes.AddRequired(WellKnownAttributes.Contact.Email);
    fetchRequest.Attributes.AddRequired(WellKnownAttributes.Name.FullName);
    request.AddExtension(fetchRequest);
}

}`

As seen in the code, the OpenIdProvider I am trying to use is http://localhost:39167/ which is being developed by the DotNetOAuth Samples i.e. OpenIdWebRingSsoProvider and OpenIdWebRingSsoRelyingParty and is defined in the RP webconfig as

`<appSettings>
    <add key="SsoProviderOPIdentifier" value="http://localhost:39167/"/>
    <add key="SsoProviderOPEndpoint" value="http://localhost:39167/server.aspx"/>
  </appSettings>`

And I am registering the CustomOpenIdClient in my website as

OAuthWebSecurity.RegisterClient(new CustomOpenIdClient(), "TestOpenId", new Dictionary<string, object>());

Now when I try to authenticate I get No OpenId End Point found

OAuthWebSecurity.RequestAuthentication(Provider, ReturnUrl)

Localhost is already defined in the whitelist in RP's webconfig. Please let me know what am I missing here which is causing this No OpenId End point error ?

Thanks,
SB

Mansfield
  • 14,445
  • 18
  • 76
  • 112
Sumit Bakshi
  • 23
  • 1
  • 7
  • There are many things which can be the issue when that generic error message is returned. I'd recommend configuring logging which will yield much more detailed information about what's happening behind the scenes. See this article from the DNOA docs: https://github.com/DotNetOpenAuth/DotNetOpenAuth/wiki/Logging-and-debugging – Mansfield Aug 22 '13 at 14:24

1 Answers1

0

I was able to solve it using

  <system.net>
        <defaultProxy>
            <proxy
              usesystemdefault="true"
              proxyaddress="http://webproxy....net:8080"
              bypassonlocal="true"
      />
        </defaultProxy>
    </system.net>