我正在尝试将FileUpload项目从vid.ly集成到我的web应用程序,这是在使用Razor的MVC ASP .NET 4框架中。
我有一个HttpHandler在App_Code下面。Progress.cs
public class Progress : IHttpHandler
{
...
}我在RegisterRoutes()中添加了从Globals.asax调用的内容:
routes.IgnoreRoute("Progress.progress");并在system.web部分的web.config中添加了这些行:
<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映射好像出了问题。有人知道我错过了什么吗?
发布于 2014-04-12 18:37:55
我终于弄明白问题出在哪里了。我必须将映射放在system.webServer部分中,格式如下:
<add name="Progress" verb="*" path="*.progress" type="MyNamespace.Progress,MyNamespace"/>或者,将Action路径设置为Progress.cs文件的"Content“,这样就不会在MyNamespace.dll中编译
https://stackoverflow.com/questions/22997191
复制相似问题