Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8433623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:26:16+00:00 2026-06-10T06:26:16+00:00

this question on google authentication when i try to run below code page successfully

  • 0

this question on google authentication when i try to run below code page successfully load but when i’am click button of login with Google then at debugging display error on this line.

Error at

GetExtension<FetchResponse>() 

on line

Var fetchResponse = Response.GetExtension<FetchResponse>()

So what’s Problem in this line..i try to search on this problem but i does not get it that solution

protected void Page_Load(object sender, EventArgs e)
    {
        OpenIdRelyingParty rp = new OpenIdRelyingParty();
        var r = rp.GetResponse();
        if (r != null)
        {
            switch (r.Status)
            {
                case AuthenticationStatus.Authenticated:
                    NotLoggedIn.Visible = false;
                    Session["GoogleIdentifier"] = r.ClaimedIdentifier.ToString();
                    Response.Redirect("Default4.aspx"); //redirect to main page of your website  
                    var fetchResponse = Response.GetExtension<FetchResponse>();
                    Session["FetchResponse"] = fetchResponse;
                    var response2 = Session["FetchResponse"] as FetchResponse;
                    // Use FormsAuthentication to tell ASP.NET that the user is now logged in,
                    // with the OpenID Claimed Identifier as their username.
                    string uname = response2.GetAttributeValue(WellKnownAttributes.Name.First) ?? "Guest";
                    FormsAuthentication.RedirectFromLoginPage(uname, false);   //(response.ClaimedIdentifier, false);
                    break;

                case AuthenticationStatus.Canceled:
                    lblAlertMsg.Text = "Cancelled.";
                    break;

                case AuthenticationStatus.Failed:
                    lblAlertMsg.Text = "Login Failed.";
                    break;
            }
        }
    }

    protected void OpenLogin_Click(object src, CommandEventArgs e)
    {
        string discoveryUri = e.CommandArgument.ToString();
        OpenIdRelyingParty openid = new OpenIdRelyingParty();
        var b = new UriBuilder(Request.Url) { Query = "" };
        //var req = openid.CreateRequest(discoveryUri, b.Uri, b.Uri);


        //var req = openid.CreateRequest(discoveryUri, b.Uri, b.Uri);
        var req = openid.CreateRequest(discoveryUri);

        // This is where you would add any OpenID extensions you wanted
        // to include in the authentication request. In this case, we are making use of OpenID Attribute Exchange 1.0
        // to fetch additional data fields from the OpenID Provider
        var fetchRequest = new FetchRequest();
        fetchRequest.Attributes.AddRequired(WellKnownAttributes.Contact.Email);
        fetchRequest.Attributes.AddRequired(WellKnownAttributes.Name.First);
        fetchRequest.Attributes.AddRequired(WellKnownAttributes.Name.Last);
        fetchRequest.Attributes.AddRequired(WellKnownAttributes.Contact.HomeAddress.Country);
        req.AddExtension(fetchRequest);


        req.RedirectToProvider();

    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:26:18+00:00Added an answer on June 10, 2026 at 6:26 am

    It should be

    var fetchResponse = r.GetExtension<FetchResponse>();
    

    instead of

    var fetchResponse = Response.GetExtension<FetchResponse>();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I also posted this question on the Google Group https://groups.google.com/forum/?fromgroups#!topic/d3-js/DYiVeC544ws , but saw that
I've done some research on this question (both via google and on here), but
I asked this question in the restkit google group, but realize now that it
I know this question can be answered by searching in google. But I have
I was thinking this question for a while, and ever tried to google but
This question was initially posted on Google Moderator for the AndroidDev Office Hours Hangout
This question came today in the manipulatr mailing list. http://groups.google.com/group/manipulatr/browse_thread/thread/fbab76945f7cba3f I am rephrasing. Given
Let me preface this question by saying I've exhausted Google, or at least what
I have looked around on Google and StackOverflow for the answer to this question,
Hi i was asked in an interview about this question. I did google a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.