简体   繁体   English

ASP.NET MVC-HttpException在浏览器的查看源中可见

[英]ASP.NET MVC - HttpException visible in View Source in browser

I developed an asp.net mvc application. 我开发了一个asp.net mvc应用程序。 In one of my forms, I'm getting a following exception: 在我的一种形式中,出现以下异常:

A public action method 'UpdateBasket' could not be found on controller 'App.Controllers.WebShopController' 在控制器“ App.Controllers.WebShopController”上找不到公共操作方法“ UpdateBasket”

But the funny thing is, that form submit works (even in debug mode) and finds an ActionMethod UpdateBasket and returns View. 但是有趣的是,该表单提交工作(即使在调试模式下也是如此)并找到一个ActionMethod UpdateBasket并返回View。 The problem is that because of that html generated error w3c validators and google crawlers can't access the site (I think so, correct me if I'm wrong). 问题是由于html生成的错误w3c验证程序和Google搜寻器无法访问该网站(我想是的,如果我错了,请纠正我)。

Has anybody got any idea why this error occurs? 有谁知道为什么会发生此错误? Thank you. 谢谢。

Perhaps you're using Google Chrome to view the page source and you're encountering its tendency to reissue a "get" request for a post-only URL that your browser just "post"-ed to? 也许您使用的是Google Chrome浏览器来查看页面源,并且遇到了重新发出对浏览器刚刚“发布”到的仅发布URL的“获取”请求的趋势?
This is the best description I've found. 这是我找到的最好的描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM