简体   繁体   English

Default.aspx不触发事件

[英]Default.aspx not firing events

We have recently put up a new server with IIS7, where we now have published a .NET4 site. 我们最近在IIS7上安装了新服务器,现在在该服务器上发布了.NET4网站。

Locally everything works fine, but on this server the Default.aspx is not working. 在本地,一切正常,但是在此服务器上,Default.aspx无法正常工作。 No events are firing at all for this page. 此页面根本没有触发任何事件。 Every other page works as should. 其他所有页面均应正常工作。

We've tried deleting the Default.aspx and adding a new blank one with just a button event but same thing still applies. 我们尝试删除Default.aspx并添加一个仅带有按钮事件的新空白文件夹,但同样适用。

We've spent quite some time troubleshooting this without any results. 我们花了很多时间对此进行故障排除,但没有任何结果。 Same problem exists both with and without using a masterpage. 使用和不使用母版页都存在相同的问题。

Edited to add: 编辑添加:

After more research it was a module from Telerik that caused it. 经过更多的研究,它是由Telerik产生的一个模块。 When disabling RadCompression everything work as intended. 禁用RadCompression时,一切都会按预期进行。

Locally everything works fine 在本地一切正常

On your local IIS or Cassini? 在您的本地IIS还是Cassini上?

Check for "AutoWireUpEvent" property in the page directive 检查页面指令中的“ AutoWireUpEvent”属性

That's really weird. 真的很奇怪 Maybe you can try: Find other machines to visit the site, to see if it's working. 也许您可以尝试:查找其他机器以访问该站点,以查看其是否正常运行。 If you are using IE, go to Internet Options->General->Settings->Check for version of stored pages->Every visit to the page. 如果使用的是IE,请转至Internet选项->常规->设置->检查存储页面的版本->每次访问该页面。 And even delete all temp files then try. 甚至删除所有临时文件,然后尝试。

Problem When RadCompression is enabled and you are using .NET 4.0, event handlers might not be raised in a default document in IIS 7 or IIS 7.5 Integrated Mode. 问题当启用RadCompression并使用.NET 4.0时,IIS 7或IIS 7.5集成模式下的默认文档中可能不会引发事件处理程序。

Solution This problem is caused by a breaking change in .NET 4.0 described here. 解决方案此问题是由此处所述的.NET 4.0的重大更改引起的。 To workaround it one can set precondition="managedHandler" for the RadCompression module. 要解决此问题,可以为RadCompression模块设置precondition="managedHandler" You may also need to remove the runAllManagedModulesForAllRequests setting from your web.config if you have it (or set it to false). 如果有的话,可能还需要从web.config删除runAllManagedModulesForAllRequests设置(或将其设置为false)。

Described here: http://www.telerik.com/help/aspnet-ajax/radcompression.html 在此处描述: http : //www.telerik.com/help/aspnet-ajax/radcompression.html

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

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