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

  • Home
  • SEARCH
  • 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 6987701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:58:19+00:00 2026-05-27T18:58:19+00:00

I am using dotnetopenid in my asp.net 2.0 and VS 2005.I have done only

  • 0

I am using dotnetopenid in my asp.net 2.0 and VS 2005.I have done only this work and a succeful authentication is done by me.I have a login page and after authentication it goes to food.aspx.I only want to display the email address of user on food.aspx after authentication from google.I have done only following work for the openid nothing else please tell me which code i have to write in login.aspx or food.aspx to display the email address of user.

<%@ Register Assembly="DotNetOpenAuth" Namespace="DotNetOpenAuth.OpenId.RelyingParty" TagPrefix="rp" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"    Namespace="System.Web.UI" TagPrefix="asp" %>

<rp:OpenIdLogin ID="OID" runat=server Identifier="https://www.google.com/accounts/o8/id" ></rp:OpenIdLogin>

Update
I have wrote this code in page load event of login.aspx

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As OpenIdEventArgs)
        Dim openid As New OpenIdRelyingParty()
        Dim request As IAuthenticationRequest = openid.CreateRequest("https://www.google.com/accounts/o8/id")
        Dim fetch As New FetchRequest()
        fetch.Attributes.AddRequired(WellKnownAttributes.Contact.Email)
        request.AddExtension(fetch)
        request.RedirectToProvider()
   End Sub

And Page Load Evemt of Food.aspx Write the follwoing code

  Dim openid As OpenIdRelyingParty = New OpenIdRelyingParty
        Dim response = openid.GetResponse
        If (Not (response) Is Nothing) Then
            Select Case (response.Status)
                Case AuthenticationStatus.Authenticated
                    Dim fetch = response.GetExtension
                    Dim email As String = String.Empty
                    If (Not (fetch) Is Nothing) Then
                        email = fetch.GetAttributeValue(WellKnownAttributes.Contact.Email)
                    End If
                    FormsAuthentication.RedirectFromLoginPage(response.ClaimedIdentifier, False)
            End Select
        End If

But still getting error of in login.aspx page load event in this line

fetch.Attributes.AddRequired(WellKnownAttributes.Contact.Email)

Error is

AddRequired is not a member of System.Collections.ObjectModel.KeyedCollection
(Of DotNetOpenAuth.OpenId.Extensions.AttributeExchange.AttributeRequest

what can i do for this

  • 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-05-27T18:58:20+00:00Added an answer on May 27, 2026 at 6:58 pm

    When your user will Authenticate himself st Google, he will be redirected back to your web-page.
    Since you are using open Id you can use Attribute exchange to get user email and Full name when user is being redirected back to Your web-page.

    Now all you need to do is to extract the email and Name of the user from the response and display/store them as per you need.

    Here is the detail how to get this using above library

    openid-trying-to-get-email-address-from-google-op

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ASP.Net 2.0 website that is currently using a custom MembershipProvider and
I'm using .Net Open ID ( http://code.google.com/p/dotnetopenid/ ) I'm trying to add OpenId to
Using ASP.NET MVC there are situations (such as form submission) that may require a
using the jquery ui modal dialog , the background shades grey (i assuming this
Using of mobile dialog authentication is working well for other mobile devices except on
Using Ivy with this Ant target: <target name=retrieve-jars> <ivy:retrieve pattern=WebContent/WEB-INF/lib/[artifact].[ext] /> </target> to fetch
using SQL Server 2005 standard edition with SP2 I need to design a table
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using NSDateComponents I know how to get the day component, but this gives me
Using MVC2 I have an AJAX form which is posting to a bound model.

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.