我想设置我的web.config文件重定向到login.cshtml如果一个cookie未设置。我怎样才能做到这一点?我现在所拥有的还有一些我不明白的行为。我有:设置web.config文件,如果一个cookie设置
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authentication mode="Forms">
<forms loginUrl="Login.cshtml" name=".ASPXFORMSAUTH">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
正在发生的事情是用户被重定向到
"Account/Login ReturnUrl=%2fdefault.cshtml"
所以default.cshtml正在呈现,与在它集中放置一个奇怪的登录页面?这可能与我的程序的结构做的,但我真的不明白被称为是什么,可能使这个奇怪的HTML?