【发布时间】:2013-02-15 19:02:53
【问题描述】:
以下是我用 vb.net 编写的代码。
受保护的子 OpenIdButton3_LoggedIn(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs) 处理 OpenIdButton3.LoggedIn
OpenIdButton3.Visible = False
Dim profile As ClaimsResponse = e.Response.GetExtension(Of ClaimsResponse)()
Dim email As String = profile.Email
消息框(电子邮件)
结束子
但线
Dim email As String = profile.Email
出现以下错误。
异常详细信息:System.NullReferenceException:对象引用未设置为对象的实例。
我已阅读相关文档,并在 webconfig 中实现了 AXFetchAsSregTransform。以下是显示相同的块。
<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>
>
<openid>
<relyingParty>
<add type="DotNetOpenAuth.OpenId.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth" />
</behaviors>
</relyingParty>
</openid>
即便如此,我似乎也得到了空值。我正在从 Google 获得身份验证。
谁能帮我解决这个问题?
【问题讨论】:
标签: openid dotnetopenauth