简体   繁体   English

在 azure appservice 上找不到 WebResource.axd 错误

[英]WebResource.axd not found error on azure appservice

When I migrated Asp.net webform (framework 4.7) website to azure I encountered 404 not found error for WebResource.axd files I have included the handler manually in web.config like the following当我将 Asp.net webform(框架 4.7)网站迁移到 azure 时,我遇到了 WebResource.axd 文件的 404 not found 错误,我在 web.config 中手动包含了处理程序,如下所示

  <system.webServer>
    <handlers>
      <add name="AssemblyResourceLoader-Integrated-4.0" path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader" 
           preCondition="integratedMode" />
    </handlers>
  </system.webServer>

I also tried to configure handlers in system.web as well but with no luck.我也尝试在 system.web 中配置处理程序,但没有运气。

  <system.web>
    <httpHandlers>
      <add   path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader"/>
    </httpHandlers>
  </system.web>

It only works when I deploy the site locally on IIS.它仅在我在 IIS 上本地部署站点时才有效。 Has anybody encountered this before?,Should I make any specific configuration in azure for that to work?以前有没有人遇到过这种情况?,我应该在 azure 中进行任何特定配置才能使其正常工作吗?

Click your webapp in local and enter F4, in Properties ,switched the managed pipeline mode from classic to integrated , that fix it.在本地单击您的 webapp 并输入 F4,在Properties ,将managed pipeline modeclassic切换到integrated ,修复它。

Or you could add a handler at web.config :或者你可以在web.config添加一个处理程序:

<handlers>
  <add name="AXD-ISAPI-4.0_32bit" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> 
</handlers> 

Refer to this issue .请参阅此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM