文章内容

2016/11/13 16:01:18,作 者: 黄兵

asp.net mvc 错误处理

最近网站在上线运营的时候,各种各样的问题出现了。


上图是在上传的时候返回了源代码,实在是让人匪夷所思,后经过查实,是由于上传图片的这个目录没有写权限,但是也没有报错,返回的是登陆页面的源代码,你说奇怪不奇怪?

对应英文报错提示:

Server Error in '/' Application.


The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.


这个我也不清楚这里的一个架构方式,应为我采用的是BlueHost的虚拟空间,登陆或者提交表单的时候都会出现这种错误,好像是应为集群的缘故,我想应该不会用集群,怎么会报这种错误,之后加上machine. key解决问题,稍后我会把加入的源代码贴出来。
节点下面加如下代码:
分享到:

发表评论

评论列表