После записывается мой код в vb.net.возвращает расширение OpenIdButton в нуль
Protected Sub OpenIdButton3_LoggedIn (ByVal отправитель As Object, ByVal е Как DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs) Ручки OpenIdButton3.LoggedIn
OpenIdButton3.Visible = False
дим профиль, как ClaimsResponse = е. Response.GetExtension (Of ClaimsResponse)()
Dim электронной почты As String = profile.Email
MsgBox (электронная почта)
End Sub
Но линия
Dim электронная почта As String = profile.Email
дает следующую ошибку.
Сведения об исключении: System.NullReferenceException: Ссылка на объект не установлена в экземпляр объекта.
Я прочитал соответствующую документацию по этому вопросу, и я внедрил AXFetchAsSregTransform в webconfig. Ниже приведен блок, который показывает то же самое.
<sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core">
<section name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection" requirePermission="false" allowLocation="true" />
<section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement, DotNetOpenAuth.OpenId" requirePermission="false" allowLocation="true" />
<section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement, DotNetOpenAuth.OAuth" requirePermission="false" allowLocation="true" />
<section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
<section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
</sectionGroup>
> < dotNetOpenAuth>
<openid>
<relyingParty>
<add type="DotNetOpenAuth.OpenId.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth" />
</behaviors>
</relyingParty>
</openid>
</dotNetOpenAuth>
Даже тогда, я, кажется, чтобы получить нулевое значение. Я получаю аутентификацию от Google.
Может ли кто-нибудь помочь мне в этом?