WebResource.axd giving 403 error in ASP.Net Post backs using IIS7

送分小仙女□ 提交于 2019-12-04 20:59:31

Navigate to your iis config folder. Typically: c:\windows\system32\inetsrv\config and open applicationHost.config file. Then within file navigate to the <handlers> section and check that following line is present:

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

That is if you're running in integrated mode. Check that verb GET is specified.

If you are running in classic pipeline mode that this line should be present

<add name="AXD-ISAPI-2.0" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />

If everything seems to be ok than look at your web.config in Handlers and Modules section and see if you have added <clear /> on the top of each. If you did then you have include add section in your web.config file respecting the order in of the handlers/modules specified in applicationHosting.config file.

Check your IIS logs - they should give a status code that has more detailed information about the error. Also, what is the nature of the error on the postback?

This is the error that I'm getting when doing a Postback:

WebForm_PostBackOptions is undefined.

To my knowledge that function is contained inside the WebResource.axd file, which led me to try it in the address bar, which how I know about the 403 error...

Not sure on that one, but it may be related to http compression in IIS. Also check that the file is accessible to the IIS User.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!