<configuration>
<configSections>
<section name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection" requirePermission="false" allowLocation="true"/>
</configSections>
<dotNetOpenAuth>
<openid>
<relyingParty>
<behaviors>
<!-- The following OPTIONAL behavior allows RPs to use SREG only, but be compatible
with OPs that use Attribute Exchange (in various formats). -->
<add type="DotNetOpenAuth.OpenId.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth" />
</behaviors>
</relyingParty>
</openid>
</dotNetOpenAuth>
</configuration>
http://dotnetopenauth.net:8000/wiki/CodeSnippets/OpenIDRP/AXFetchAsSregTransform
将配置信息添加到web.config。
谷歌有一个独特的特点,它忽略了所有标记为“可选”的属性请求。您必须根据“需要”请求用户的电子邮件地址,才能从谷歌获得电子邮件地址。不过,要小心,通过按要求标记属性,谷歌将拒绝对用户进行身份验证,除非用户愿意放弃他们的电子邮件地址。因此,如果您实际上不需要电子邮件地址,最好将其标记为可选,并放弃从您的谷歌用户那里获取电子邮件地址,以避免在用户不愿意的情况下强迫他们放弃电子邮件地址,从而将用户赶走。