[英]Getting error Menu_HoverStatic is null or undefined, not a function object, while using asp.net SiteMap control for menu items
Ours is ASP.net application which we recently migrated from Windows 2008 to Windows 2016 server IIS 10. In Windows 7 OS in IE 11, we face the issue where menu items are not accessible and is throwing error on hover over:(Chrome and Win 10 IE 11 application is working good) 我们的ASP.net应用程序最近从Windows 2008迁移到Windows 2016服务器IIS10。在IE 11中的Windows 7 OS中,我们面临菜单项无法访问且将鼠标悬停时出错的问题:(Chrome和Win 10 IE 11应用程序运行良好)
The value for property 'Menu_HoverStatic' is null or undefined, not a function object. 属性“ Menu_HoverStatic”的值为null或未定义,不是函数对象。
Event Logs are registering a different error: 事件日志记录了另一个错误:
Event message: An error occurred processing a web or script resource request. 事件消息:处理Web或脚本资源请求时发生错误。 The resource identifier failed to decrypt. 资源标识符解密失败。
<Data>w3wp.exe</Data>
<Data>IIS APPPOOL\SDMS3AppPool</Data>
<Data>HttpException</Data>
<Data>Unable to validate data.
at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData)
at System.Web.UI.Page.DecryptString(String s, Purpose purpose)
at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
</Data>
<Data>https://yourdomain.com/WebResource.axd?d=4008OIcfpQF6_PTcMUk_uuvjlbvBEPqjv3TH_Vnn6L3r0AEZJ8Q033KeIIkTHLC_AKyJ_c9JpdqPlJLfGOrxCpK--hZQ1gp-BXe8XbRP_6g1&t=636511268826842555</Data>
<Data>/WebResource.axd</Data>
We call SiteMap in master page: 我们在母版页中称为SiteMap:
<div class="NavigationContent">
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" DataSourceID="SiteMapDataSource"
CssClass="Menu"
StaticEnableDefaultPopOutImage="false"
DynamicEnableDefaultPopOutImage="false"
StaticMenuItemStyle-CssClass="MenuItem"
StaticHoverStyle-CssClass="MenuItemHover"
StaticSelectedStyle-CssClass="MenuItemSelected"
DynamicMenuItemStyle-CssClass="MenuItem"
DynamicHoverStyle-CssClass="MenuItemHover"
DynamicSelectedStyle-CssClass="MenuItemSelected"
OnDataBound="Menu1_DataBound"
/>
<asp:SiteMapDataSource ID="SiteMapDataSource" runat="server" ShowStartingNode="false" />
</div>
Going through google, this error seems to be due to webresource.axd. 通过谷歌,这个错误似乎是由于webresource.axd。 I tried following suggestions among many: 我尝试了以下建议:
App pool mode set to Integrated, .net 4 应用程序池模式设置为Integrated,.net 4
Set browser security level to low 将浏览器安全级别设置为低
Add webresource.axd in IIS handler mapping for application virtual directory. 在IIS处理程序映射中为应用程序虚拟目录添加webresource.axd。
Thanks for all the help!! 感谢所有的帮助!
I tried a lot of suggestions and at last this issue was resolved by machine key. 我尝试了很多建议,最后通过机器密钥解决了这个问题。 If your server is a web farm, make sure you have same key in all servers. 如果您的服务器是Web场,请确保所有服务器中都有相同的密钥。
<system.web>
<machineKey validationKey="2488181654410AFDA27F6A1F4855B75E4E3BD4C7A18969D151A7524CEBE432583762F430B31D86AEEFD368CD2104616C38EABFCBC7C658DA3A553******" decryptionKey="30DC1CA2BD1BDDAB7BFA18DE02B0059443EC656B39FAB179E38CBD82CCF4E***" validation="SHA1" decryption="Auto"/>
</system.web>
you can follow below article to generate machine key: 您可以按照以下文章生成机器密钥:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.