在页面向后台发送请求时,报如上图的错误的解决办法:

在WebModule.cs类中的PreInitialize方法中加

Configuration.Modules.AbpWeb().AntiForgery.IsEnabled = false;

另外还有添加引用:

using Abp.Configuration.Startup;

出现这个问题的原因是没有使用abp.ajax的请求方式,而是使用其他的方式

另外还有其他的解决办法:

1.在Controller的Action里标注:[DisableAbpAntiForgeryTokenValidation]

2.在ajax的header里添加键值‘x-xsrf-token’:abp.security.antiForgery.getToken()

页面发送请求到后台报错“Empty or invalid anti forgery header token.”问题解决的更多相关文章

  1. ABP Zero示例项目登录报错“Empty or invalid anti forgery header token.”问题解决

    ABP Zero项目,登录时出现如图"Empty or invalid anti forgery header token."错误提示的解决方法: 在 WebModule.cs的P ...

  2. curl 发送请求的时候报错

    AWS HTTP error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see ...

  3. Apache报错信息之Invalid command 'Order', perhaps misspelled or defined by a module not included in the server config

    今天配置开启Apache虚拟主机时, 然后日志报错提示: Invalid command 'Order', perhaps misspelled or defined by a module not ...

  4. 发布报错:Error ITMS-90635 - Invalid Mach-O in bundle - submitting to App store

    发布报错:Error ITMS-90635 - Invalid Mach-O in bundle - submitting to App store 昨晚上传项目到AppStore,报了这个错,纳尼! ...

  5. django报错解决:Invalid HTTP_HOST header: 'xxx.com'. You may need to add u'xxx.com' to ALLOWED_HOSTS.

    django版本:1.11.15 使用uwsgi+nginx运行django程序,出现报错,报错为:Invalid HTTP_HOST header: 'xxx.com:82'. You may ne ...

  6. Mac 升级后idea执行git命令报错xcrun: error: invalid active developer path的解决办法

    报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun ...

  7. linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.

    linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 1 ...

  8. oracle+mybatis报错:BindingException("Invalid bound statement (not found): ")

    oracle+mybatis报错:BindingException("Invalid bound statement (not found): ") 从mysql转到oracle数 ...

  9. egg启动时,报错:Ignoring invalid timezone passed to Connection的解决方案

    报错信息 Ignoring invalid timezone passed to Connection: +8:00. This is currently a warning, but in futu ...

随机推荐

  1. $.Deferred 延迟对象

    一.什么是deferred对象? 开发网站的过程中,我们经常遇到某些耗时很长的javascript操作.其中,既有异步的操作(比如ajax读取服务器数据),也有同步的操作(比如遍历一个大型数组),它们 ...

  2. Markdown: 编译pdf

    在网上发布博文的时候希望能顺便在本地保存一份记录,这样总结的东西很多的时候就可以写成一本给自己看的小书了.在linux下面有两个选择latex和markdown,虽然latex非常强大,但是很少有博客 ...

  3. CSS active选择器与CSS hover选择器

    <!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8& ...

  4. 【Android Developers Training】 9. 覆盖于布局之上的Action Bar

    注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...

  5. 一个"Median Maintenance"问题

    题目要求: Download the text file here. The goal of this problem is to implement the "Median Mainten ...

  6. Maven部署(linux)

    1.下载 进入http://maven.apache.org/download.cgi下载.或者使用wget命令. mkdir /opt/maven cd /opt/maven wget http:/ ...

  7. Ant部署(linux)

    1.下载 mkdir /opt/ant cd /opt/ant wget http://mirror.bit.edu.cn/apache//ant/binaries/apache-ant-1.9.4- ...

  8. linux中日志介绍

    linux日志 linux日志大多是以明文存储,一般存储在/var/log目录中,linux系统中主要有三个日志子系统:连接时间日志,进程统计日志,错误日志. 连接时间日志 连接时间日志是有多个程序执 ...

  9. 使用 QDockWidget嵌套布局来实现复杂界面,方便用户可以自定义界面,自由组合窗口

    http://www.cnblogs.com/findumars/p/5436533.html

  10. Java试题

    1.不使用循环,等比数列输出整型 n.2n.4n.8n--当大于max时,反向输出8n.4n.2n.n. 例如 n=10,max=100. 输出: 10 20 40 80 80 40 20 10 解题 ...