user888346
user888346

Reputation: 31

dotnetopenauth: No OpenID endpoint found. SSO Relying Party Google

I am using the SSO Relying Party Sample, I continue to get the following error:

No OpenID endpoint found.

Sequence contains no elements Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Sequence contains no elements

At the Login.aspx.cs at the following line(s) of code.

var request = relyingParty.CreateRequest( ConfigurationManager.AppSettings["SsoProviderOPIdentifier"], realm, returnTo);

I have set up the web config settings for that AppSetting as follows:

<appSettings>
    <add key="SsoProviderOPIdentifier" value="https://www.google.com/accounts/o8/ud"/>
    <add key="SsoProviderOPEndpoint" value="https://www.google.com/accounts/o8/ud"/>
</appSettings>

I have configured all other samples dotnetopenauth provides, they all work great. This error makes no sense, I clearly have the endpointID right.

Upvotes: 2

Views: 1122

Answers (1)

Andrew Arnott
Andrew Arnott

Reputation: 81791

Your identifier is wrong. It should end in 'id' rather than 'ud'

<appSettings>
    <add key="SsoProviderOPIdentifier" value="https://www.google.com/accounts/o8/id"/>
    <add key="SsoProviderOPEndpoint" value="https://www.google.com/accounts/o8/ud"/>
</appSettings>

Upvotes: 1

Related Questions