不允许使用 HTTP 动词 POST 来访问路径“/”

2023-12-12

整个错误:

Server Error in '/' Application.

The HTTP verb POST used to access path '/' is not allowed.
Description: An unhandled exception occurred during the execution of the current 
web request. Please review the stack trace for more information about the error 
and where it originated in the code.

Exception Details: System.Web.HttpException: The HTTP verb POST used to access
path '/' is not allowed.

Source Error:

An unhandled exception was generated during the execution of the current web 
request. Information regarding the origin and location of the exception can be
identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The HTTP verb POST used to access path '/' is not allowed.]
System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +2871966
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8679410
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

老实说,我什至不确定错误来自哪里。我通过虚拟服务器运行 Visual Studio 2008。我只是放了一个按钮:

<asp:Button ID="btnRegister" runat="server" Text="Register" 
                            CssClass="bt_register" onclick="btnRegister_Click" />

在登录用户控件上,onclick 事件只是一个简单的response.redirect

Response.Redirect("~/register.aspx");

调试项目时,它甚至没有调用 btnRegister_Click 方法。我不知道从哪里开始调试这个错误。任何信息都会有帮助。我可以发布我拥有的所有代码,但就像我说的,我不确定这个错误是在哪里抛出的。

Edit

它与按钮单击事件完全无关。我去掉了 aspx 页面上的方法和 onclick 参数。仍然出现同样的错误

发现问题

好的,这是一个学校项目,也是一个小组项目。我小组中的一些人认为最好在该区域周围加上一个表单标签,告诉它要发布。发现它与 Google 代码的修订版进行了比较。


您正在重写 URL 吗? 看来是url重写有问题。

http://www.lukemelia.com/blog/archives/2007/01/05/aspnet-the-http-verb-post-used-to-access-path-is-not-allowed/

您必须在 IIS 设置中删除“*”到 aspnet_isapi.dll 的映射。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

不允许使用 HTTP 动词 POST 来访问路径“/” 的相关文章

随机推荐

  • 计算混淆矩阵的更快方法?

    我正在计算图像语义分割的混淆矩阵 如下所示 这是一种非常冗长的方法 def confusion matrix preds labels conf m sample size preds normalize preds 0 9 returns
  • 如何动态更改 UIStoryboard 中使用的颜色

    我想知道是否可以在故 事板中分配 动态 颜色 从iOS7开始 您可以使用tintColor并通过keyWindow的tintColor以编程方式更改它 但我找不到一种方法来影响按钮背景的色调颜色 这可以让我轻松地找到一种方法来主题我的应用程
  • 处理多种类型的 Cosmos DB 容器的读取?

    我想在单个 Cosmos DB 容器中存储几种不同的对象类型 因为它们都按逻辑分组 并且可以按时间戳一起读取 以避免额外的 HTTP 调用 但是 Cosmos DB 客户端 API 似乎没有提供一种简单的方法来执行多种类型的读取 到目前为止
  • tsql 字符串与 select 和 order by 的连接不能与 order by 子句中的函数一起使用?

    考虑下面的sql create function dbo wtfunc s varchar 50 returns varchar 10 begin return left s 2 end GO select t into test from
  • 解释 C 预处理器代码

    Given define LOG OBJECT object NSLog object d object description NSString stringWithUTF8String FILE lastPathComponent LI
  • 用户目前在哪个国家?

    我在 stackoverflow 和 Google Groups 上浏览了一下 但还没有真正找到这个确切问题的答案 我只是想知道什么countryAndroid 手机的用户当前处于 我假设如果用户仅使用 wifi TelephonyMana
  • 代理不适用于生产中的 create-react-app

    我正在使用reactjs 创建反应应用程序 创建仪表板应用程序 在我的应用程序中 我正在调用多个主机 为此 我在 package json 中配置了多个代理以避免 CORS ex www app demo1 com www app demo
  • Xslt - 以块的形式迭代节点

    我有一个现有的 xslt 脚本 它使用 FOP 创建 PDF 问题是当节点计数超过一定限制时 在特定节点类型上执行 apply template 时内存不足 为了解决内存问题 我需要将从该模板调用得出的结果分解为几个
  • 将形状不等的数组列表转换为 Tensorflow 2 数据集:ValueError:无法将非矩形 Python 序列转换为 Tensor

    我以列表的形式标记了数据形状不均 arrays array array 1179 6 208 2 1625 92 9 3870 3 2136 435 5 2453 2180 44 1 226 166 3 4409 49 6728 10 17
  • 识别字符串中是否存在 URL

    您好 有人可以帮我使用 PHP 识别字符串中是否存在 url 吗 我想输入完整的字符串 即 嗨 请访问http domain com 12345今天 并删除完整的 url 而不仅仅是域名 Thanks 你可能想要这样的东西 RegEx Gu
  • 是否有理由在 JavaScript 条件中编写“if (myBoolean == true)”?

    许多初学者程序员会写类似的东西if myBoolean true 相对于if myBoolean 因为他们还没有意识到条件不需要包含比较 而只需包含布尔值 当我在 Twitter 上注意到这一点时 有人向我建议 在 JavaScript 中
  • 防止从 iCloud 中的应用程序备份

    The way apple storage guidelines is creating more problem for me because most of the data i am maintaining from the Docu
  • PHP递归获取字符串的所有可能性

    这是我获得所有可能性的代码 seq 1 d seq 2 f seq 3 w seq 4 s for i 1 i lt 5 i s length 1 seq i c1 for i2 i 1 i2 lt 5 i2 s length 2 seq
  • VB.NET 图片框之间的碰撞

    我正在尝试制作一个简单的游戏 我需要知道 picturebox1 我的角色 是否与其他 picturebox 墙壁 发生碰撞 我已经弄清楚了如何做到这一点 但它仅适用于我的角色和其他 1 个图片框 例如 If picturebox1 bou
  • 在模态中将 Jquery 变量传递给 php

    我正在打印图片和姓名 在网格视图中 用户将能够单击图片或名称 这将打开一个模式 其中包含所单击的图片 名称的标题 将相同
  • javascript/jQuery setInterval/clearInterval

    我正在使用 setInterval 来检查 p html 段落 是否具有特定的文本值 如果有的话我想清除间隔并继续代码流 我在 jQuery 插件中使用它 所以如果段落有 tat 文本值 我想清除间隔 然后继续使用回调函数 所以我尝试了这样
  • 如何在 DB2 中查找表的主键的名称和值

    如何找到表的主键列名和值 我尝试在 SYSCAT 表中查找 但找不到任何相关内容 这应该为您提供大型机上所需的内容 http publibz boulder ibm com cgi bin bookmgr OS390 BOOKS DSNSQ
  • 扩展 woocommerce Rest api

    我想扩展 woocommerce Rest api 以包含其 预订 扩展插件的数据 目前此扩展没有其余 api 提供的默认端点 到目前为止 我已经创建了一个插件 并添加了以下代码 add filter woocommerce rest pr
  • 获取 Recycler View 上单击的项目的位置

    我已经实施了RecyclerView而且效果很好 我有一个ArrayList其中包含回收器视图的数据 每个项目的布局都很复杂 它包含两个frameLayout Framelayout1 包含一个图像和一个文本 framelayout2 包含
  • 不允许使用 HTTP 动词 POST 来访问路径“/”

    整个错误 Server Error in Application The HTTP verb POST used to access path is not allowed Description An unhandled exceptio