Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 3 Azure和HttpHandler_Asp.net Mvc 3_Azure_Httphandler - Fatal编程技术网

Asp.net mvc 3 Azure和HttpHandler

Asp.net mvc 3 Azure和HttpHandler,asp.net-mvc-3,azure,httphandler,Asp.net Mvc 3,Azure,Httphandler,我有一个用于asp.net mvc应用程序的HttpHandler。我已经测试了asp.net和asp.net mvc 3应用程序的处理程序,一切正常 当我在基于Azure的asp.net mvc 3应用程序中使用HttpHandler时,没有调用“ProcessRequest”方法-我可以看到正在创建HttpHandler 我有以下web.config,适用于标准asp.net mvc 3应用程序: <system.web> <httpHandlers>

我有一个用于asp.net mvc应用程序的HttpHandler。我已经测试了asp.net和asp.net mvc 3应用程序的处理程序,一切正常

当我在基于Azure的asp.net mvc 3应用程序中使用HttpHandler时,没有调用“ProcessRequest”方法-我可以看到正在创建HttpHandler

我有以下web.config,适用于标准asp.net mvc 3应用程序:

  <system.web>
    <httpHandlers>
      <add type="TestWebRole.Infrastructure.HttpHandlers.EPubHandler"
           path="*.epub"
           verb="*" />
    </httpHandlers>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true" />
    <handlers>
      <add name="EPubHandler"
           type="TestWebRole.Infrastructure.HttpHandlers.EPubHandler"
           path="*.epub"
           verb="*"
           resourceType="Unspecified"
           allowPathInfo="false"
           modules="IsapiModule"
           scriptProcessor="%path%\aspnet_isapi.dll"/>
    </handlers>
  </system.webServer>

在Azure中本地运行或部署到云中时,我必须配置什么才能使其工作?

为了尝试,为什么不删除system.web下的httpHandlers部分,并将其仅保留在system.webServer中。并从system.webServer(scriptProcessor、modules、allowPathInfo)下的属性中删除所有不必要的属性


此外,您还可以检查任何未经考虑的异常、事件日志条目以及任何显示某种错误的内容。

为了尝试,为什么不删除system.web下的httpHandlers部分,并将其仅保留在system.webServer中。并从system.webServer(scriptProcessor、modules、allowPathInfo)下已经尝试过的属性中删除所有不必要的属性,但我会在之前再次给出这些属性……此外,您还可以检查任何未经考虑的异常、事件日志条目、任何显示某种错误的属性。请注意!删除system.web并剥离(scriptProcessor、模块、allowPathInfo)它正在工作…@astaykov-您应该将您的评论作为答案发布,这样它就可以正确地标记为这样(并在适当的时候给予信任!)。
 routes.IgnoreRoute("{resource}.epub/{*pathInfo}");