【问题标题】:Cannot get MiniProfiler to work with Asp.net Webform无法让 MiniProfiler 与 Asp.net Webform 一起使用
【发布时间】:2012-08-20 06:39:27
【问题描述】:

我是 MiniProfiler 的新手,并尝试让它工作。按照说明操作后,我遇到了错误 405:“不允许使用 HTTP 动词 POST 访问路径 '/Faconnect.Portal/mini-profiler-resources/results'。”

当我尝试直接链接时:

http://localhost/mini-profiler-resources/results?id=b5183613-a22a-4c59-836a-d5f066de30ef

它给了我错误:找不到页面

所以我的假设是路由不适用于我的网站。 (当我启动 MiniProfiler 演示 webforms 应用程序时它可以工作)

我已经包含了以下配置

      <modules runAllManagedModulesForAllRequests="true"/>
      <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
      <add name="UrlRoutingModule1" path="mini-profiler*.js" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
      <add name="UrlRoutingModule2" path="mini-profiler*.css" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
      <add name="UrlRoutingModule3" path="mini-profiler*.tmpl" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />

我正在使用 Windows XP、Visual Studio 2010、Cassini、ASP.net 4

【问题讨论】:

  • 这个问题与我尝试请求一个没有添加 MiniProfile.dll 的页面非常相似。有什么想法吗?
  • 这是我创建全新网站时的更新。有用。即使我将所有 Webconfig 从有缺陷的网站复制到新网站。它仍然有效。估计代码肯定有问题

标签: url-routing webforms mvc-mini-profiler


【解决方案1】:

经过数小时的努力,我找到了背后的原因。我的网站有以下格式

http://localhost:9999/App.Module1/...

这里的问题是“。”在路径中。 Cassini 或 MiniProfiler 以某种方式禁止它,我不知道。去掉那个小家伙,问题就解决了。

【讨论】:

    猜你喜欢
    • 2014-09-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多