Server Error in '/' Application.

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

Source Error:


Line 26:             string discoveryUri = "https://www.google.com/accounts/o8/id";// bu.CommandArgument.ToString();
Line 27:             var b = new UriBuilder(Request.Url) { Query = "" };
Line 28:             var req = openid.CreateRequest(discoveryUri, b.Uri, b.Uri);
Line 29: 
Line 30:             var fetchRequest = new FetchRequest();

Source File: c:\Database\Akhilhealthworld26022016\Doctor_Deshboard\App\LoginWithGpl.aspx.cs    Line: 28

Stack Trace:


[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.First(IEnumerable`1 source) +417
   DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.CreateRequest(Identifier userSuppliedIdentifier, Realm realm, Uri returnToUrl) +281

[ProtocolException: No OpenID endpoint found.]
   DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.CreateRequest(Identifier userSuppliedIdentifier, Realm realm, Uri returnToUrl) +360
   LoginWithGpl.Page_Load(Object sender, EventArgs e) in c:\Database\Akhilhealthworld26022016\Doctor_Deshboard\App\LoginWithGpl.aspx.cs:28
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4110.0