简体   繁体   English

IIS .NET Framework,ASP.NET版本不匹配

[英]IIS .NET Framework, ASP.NET Version Mismatch

I have a .NET 4.0 web application which uses an asp gridview control to display data. 我有一个.NET 4.0 Web应用程序,它使用asp gridview控件显示数据。 The control will automatically sort data when a column header is clicked. 单击列标题时,控件将自动对数据进行排序。 I have this application running and sorting fine on both a dev and test server. 我在开发服务器和测试服务器上都运行了该应用程序,并且排序良好。 However, on the prod server, it does not sort correctly. 但是,在产品服务器上,它无法正确排序。 No error is thrown, it just does not act correctly. 没有引发任何错误,只是操作不正确。 Since the code is identical I believe this has to be an environment issue. 由于代码是相同的,我认为这必须是环境问题。

When trying to troubleshoot this issue, I deliberately malformed the web.config in both environments and noticed the following difference when the error page is displayed: 尝试解决此问题时,我故意在两种环境中使web.config格式错误,并在显示错误页面时注意到以下差异:

Dev (code works as expected): 开发(代码按预期工作):

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249 

Prod (code does not work as expected): 产品(代码无法按预期工作):

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.81.0 

Could this be the cause of the issue? 这可能是问题的原因吗? What exactly does this signify? 这到底意味着什么? Trying to find this answer on my own has proved fruitless. 试图独自找到这个答案是徒劳的。 Any help is appreciated. 任何帮助表示赞赏。 Thanks! 谢谢!

This issue is caused by ASP.NET Version:4.6.81.0. 此问题是由ASP.NET版本:4.6.81.0引起的。 When updating the dev server to match this version, the gridview does not sort correctly. 在更新开发服务器以使其与此版本匹配时,gridview无法正确排序。 I'm uncertain as to whether or not this is a bug in ASP.NET or a fix for a bug which was exploited by the code. 我不确定这是ASP.NET中的错误还是代码所利用的错误的修复程序。 Regardless, the original issue was caused by difference in ASP.NET versions. 无论如何,原始问题是由ASP.NET版本中的差异引起的。

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

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