我在我的主域example.com上设置了一个项目,然后将其移动到子域sub.example.com
现在,当我尝试在OpenId上使用相同的(默认的ASP.NET MVC或我的Discourse论坛)项目并点击Google按钮使用我的Google帐户登录时,会抛出以下错误 -
那是一个错误.
OpenID auth request contains an unregistered domain: http://sub.example.com
我曾尝试使用谷歌搜索该消息,但显然我是前四个人之一.这里有什么想法?
我在Visual Studio中创建了默认的ASP.NET项目模板,然后转到了AuthConfig内部App_Start文件夹.然后我取消注释以下行:
OpenAuth.AuthenticationClients.AddGoogle();
Run Code Online (Sandbox Code Playgroud)
我得到了像Google一样登录Google的按钮:
An exception of type 'DotNetOpenAuth.Messaging.ProtocolException'
occurred in DotNetOpenAuth.OpenId.RelyingParty.dll but was not handled in user code
Additional information: No OpenID endpoint found.
Run Code Online (Sandbox Code Playgroud)
WE.config文件
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" /> …Run Code Online (Sandbox Code Playgroud)