Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net MVC.RequestVerificationToken“;他不在场。_Asp.net_Asp.net Mvc_Asp.net Mvc 3_Asp.net Mvc 4 - Fatal编程技术网

Asp.net MVC.RequestVerificationToken“;他不在场。

Asp.net MVC.RequestVerificationToken“;他不在场。,asp.net,asp.net-mvc,asp.net-mvc-3,asp.net-mvc-4,Asp.net,Asp.net Mvc,Asp.net Mvc 3,Asp.net Mvc 4,我的控制器如下所示: [ValidateAntiForgeryToken] [HttpGet] public ActionResult LogIn() { return View(); } @model Fancy.Management.Model.Home.LogInModel <html> <head> <title>Giriş</title> </head> <bod

我的控制器如下所示:

    [ValidateAntiForgeryToken]
    [HttpGet]
    public ActionResult LogIn()
    {
        return View();
    }
@model Fancy.Management.Model.Home.LogInModel
<html>
<head>
<title>Giriş</title>
</head>
<body>
@using (Html.BeginForm())
{ 
    <table>
        <tr>
            <td>Kullanıcı Adı:</td>
            <td>@Html.TextBoxFor(m => m.UserName)</td>
        </tr>
        <tr>
            <td>Şifre:</td>
            <td>@Html.PasswordFor(m => m.Password)</td>
        </tr>
        <tr>
            <td></td>
            <td>
                @Html.AntiForgeryToken()
                <input type="submit" value="Giriş" /></td>
        </tr>
    </table>
}
</body>
</html>
我的观点如下:

    [ValidateAntiForgeryToken]
    [HttpGet]
    public ActionResult LogIn()
    {
        return View();
    }
@model Fancy.Management.Model.Home.LogInModel
<html>
<head>
<title>Giriş</title>
</head>
<body>
@using (Html.BeginForm())
{ 
    <table>
        <tr>
            <td>Kullanıcı Adı:</td>
            <td>@Html.TextBoxFor(m => m.UserName)</td>
        </tr>
        <tr>
            <td>Şifre:</td>
            <td>@Html.PasswordFor(m => m.Password)</td>
        </tr>
        <tr>
            <td></td>
            <td>
                @Html.AntiForgeryToken()
                <input type="submit" value="Giriş" /></td>
        </tr>
    </table>
}
</body>
</html>
@model.Management.model.Home.LogInModel
吉里什
@使用(Html.BeginForm())
{ 
库兰·卡德:
@Html.TextBoxFor(m=>m.UserName)
如果:
@Html.PasswordFor(m=>m.Password)
@Html.AntiForgeryToken()
}
一切看起来都很好,但我有一个例外:所需的防伪cookie“\uu RequestVerificationToken”不存在


你知道吗?

一些移动设备没有执行POST,取而代之的是,GET将被执行,而不是提交令牌,exeption将被抛出。

你不能在HTTP GET上使用防伪令牌。谢谢你的帮助。我的不好。你能给我看一下这句话的文档吗?实际上,在功能手机或非常旧的手机上。伪造令牌不是通行证。