0

I am following this example: OpenID Authentication with ASP.NET MVC3 , DotNetOpenAuth and OpenID-Selector

I started a new MVC4 project and add the OpenId code as suggested in the article above.

A break point on the Authenticate action in AccountController is unreachable.

Clicking on Google or Yahoo takes me to this blank page: http://localhost:37638/Account/Authenticate?ReturnUrl=

4

2 回答 2

0

删除控制器上的 Authorize 属性的另一种方法是将 AllowAnonymous 属性添加到操作中,这为我解决了这个问题。

于 2012-03-12T20:27:42.997 回答
0

在黑暗中射击:您的 web.config 文件中是否有适当的 bindingRedirects 以使 MVC 1-3 重定向到 MVC 4?

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="4.0.0.0" />
        </dependentAssembly>
    </assemblyBinding>
</runtime>
于 2012-02-02T03:42:59.520 回答