【发布时间】:2014-04-10 19:23:44
【问题描述】:
我正在尝试将 FileUpload 项目从 vid.ly 集成到我的 Web 应用程序,该应用程序使用 Razor 引擎在 MVC ASP .NET 4 框架中。
我在 App_Code 下有一个 HttpHandler。 Progress.cs
public class Progress : IHttpHandler
{
...
}
我在从 Globals.asax 调用的 RegisterRoutes() 中添加了这个:
routes.IgnoreRoute("Progress.progress");
并在 web.config 的 system.web 部分添加了这些行:
<httpHandlers>
<add verb="*" path="*.progress" type="MyNamespace.Progress"/>
</httpHandlers>
当我尝试打开 http://localhost:39234/Progress.progress 时,我收到 HTTP Error 404.0 - Not Found 错误,并提供以下详细信息:
Requested URL http://localhost:39234/Progress.progress
Physical Path c:\users\xxxxx\documents\visual studio 2012\Projects\SolutionName\ProjectName\Progress.progress
映射似乎有问题。有谁知道我错过了什么?
【问题讨论】:
标签: asp.net-mvc mapping httphandler