问题
We're testing our websites for the new Windows 8.1 IE 11 browsers classic and metro.
There is a Javascript
file embedded in WebResource.axd
.
The WebResource
is generated and loaded fine with Firefox,Google Chrome and IE 11 with the site added in Compatibility View.
The only issue is IE 11 both classic and metro where the WebResource
is not loaded.
I am not seeking a precise answer but what confuses me is ,
I can't see the WebResource
<script>
tag in the generated HTML. Neither can I see any request made for the resource which is kind of implicit.
Now my question is where could be the issue , I debugged my code and couldn't find it failing in any of the custom handlers or modules.
Is it failing in IIS handlers (AssemblyResourceLoader-Integrated) or at the generation logic where you register the WebResource
?
回答1:
Richard's workaround above:
Setting
Page.ClientTarget = "uplevel"
in thePage_Init
event.
is the correct one; you need to disable the use of User-Agent sniffing to get ASPNET to send IE11 the proper script blocks. http://msdn.microsoft.com/en-us/library/system.web.ui.page.clienttarget.aspx
Unfortunately, it turns out that the patch they took to enable IE10 doesn't work properly with IE11 (because the IE team significantly changed the IE user agent string, removing the MSIE token by default). So, another patch for ASP.NET was shipped in June 2013. See https://stackoverflow.com/a/18651133/126229
回答2:
We were finally able to resolve the issue by installing the hotfix http://support.microsoft.com/kb/2600088 (32bit or 64 bit) mentioned by Richard and more then run the aspnet_regbrowsers -i
.
Thanks all for the solutions. Didn't want to take the claim for the answer but maybe people might not find it in comments.
来源:https://stackoverflow.com/questions/17861424/webresource-axd-not-working-with-internet-explorer-11