다음은 vb.net로 작성된 코드입니다.OpenIdButton의 확장은 null을 반환합니다.
서브 OpenIdButton3_LoggedIn 보호 (개체로 ByVal의 송신자 DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs로서 ByVal의 e)이 ClaimsResponse = E로 OpenIdButton3.LoggedIn
OpenIdButton3.Visible = 거짓
어둡게 프로필 핸들.문자열 = profile.Email
있는 MsgBox (이메일)으로
희미한 이메일() (ClaimsResponse의) Response.GetExtension
최종 하위
그러나 선
문자열 = 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>
> < dotNetOpenAuth>
<openid> <relyingParty>
</dotNetOpenAuth><add type="DotNetOpenAuth.OpenId.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth" /> </behaviors> </relyingParty> </openid>
그렇다면 null 값을 얻는 것 같습니다. Google로부터 인증을 받고 있습니다.
아무도 도와 줄 수 있습니까?