Im building an application in Visual Studio. When I run the debug mode, It automatically redirects me to the login page. The start page URL is this: http://localhost:52450/Home but That won't load and redirects to http://localhost:52450/Admin/Login?ReturnUrl=%2fHome. The application should be usable even without the login though.
I found this in my web.config file:
<authentication mode="Forms">
<forms loginUrl="/Admin/Login" />
</authentication>
答案 0 :(得分:0)
以下修复程序之一将对您有所帮助。
Anonymous
身份验证方法以及Forms
身份验证。Authorize
属性添加到控制器,暂时将其删除,但稍后在实施登录页面时添加。