所需的防伪cookie“__requestverificationtoken”不存在 [英] The required anti-forgery cookie “__requestverificationtoken” is not present

查看:1838
本文介绍了所需的防伪cookie“__requestverificationtoken”不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在mvc 5 Web应用程序中使用了

反伪造令牌

,在我的本地机器代码工作正常并显示

 __ RequestVerificationToken 

在cookies中,但当我托管我的网站时,它显示

发布数据时所需的防伪cookie__RequestVerificationToken不存在





我尝试了什么:



更改绑定,重新启动我的IIS。

解决方案

请尝试以下链接中的解决方案,这可能有助于解决您的问题。



所需的防伪表格字段__RequestVerificationToken不存在。 [< a href =https://www.codeproject.com/Questions/776742/The-required-anti-forgery-form-field-RequestVerifitarget =_ blanktitle =New Window> ^ ]



c# - 所需的防伪cookie__RequestVerificationToken不存在 - Stack Overflow [ ^ ]

I have used

anti-forgery token

in mvc 5 Web Application, In my Local machine code is working fine and showing

__RequestVerificationToken

in cookies, But when I host my website then It is showing

The required anti-forgery cookie "__RequestVerificationToken" is not present

while posting the data.

What I have tried:

Change Binding, Restart my IIS.

解决方案

Please try the solutions from the below links and it may help resolve your issue.

The required anti-forgery form field "__RequestVerificationToken" is not present.[^]

c# - The required anti-forgery cookie "__RequestVerificationToken" is not present - Stack Overflow[^]


这篇关于所需的防伪cookie“__requestverificationtoken”不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆