简体   繁体   English

在维护会话的同时将Web场迁移到asp.net的运行时版本4

[英]Migrating web farm to runtime version 4 of asp.net while maintaining session

We've migrated our webapplication from .net runtime 2 (v 3.5) to .net runtime 4 (v 4.5) and I have a question for deployment. 我们已经将.net运行时2(v 3.5)中的web应用程序迁移到.net运行时4(v 4.5),我有一个部署问题。 Our sessionstate server is a "stateserver", and runs aspnetsession from framework 2 on a separate server. 我们的sessionstate服务器是一个“stateserver”,它在一个单独的服务器上从框架2运行aspnetsession。 When we deploy and upgrade the application pool to .net 4 to one of our webservers in test, it seems that the session expires or is dropped somehow as we're redirected to the logon page of our application. 当我们将应用程序池部署并升级到.net 4到我们的一个测试Web服务器时,似乎会话过期或以某种方式被删除,因为我们被重定向到我们的应用程序的登录页面。

Is there any way of deploying our new version of the app without our users losing session in the process? 有没有办法部署我们的新版本的应用程序,而我们的用户不会在此过程中丢失会话? Are the sessioncookie created by application pools runnning in .net 2 not compatible with .net 4? 在.net 2中运行的应用程序池创建的sessioncookie是否与.net 4不兼容? I cannot see anything about this in the breaking changes whitepaper 我在破坏性的变化白皮书中看不到任何关于此的内容

Edit: Application Path of the website is the same, it has not changed for this version of our application, and we have done "no-downtime" deployments (users don't notice new version and are not logged out) for 5-6 years with approx 50 releases. 编辑:网站的应用路径是相同的,我们的应用程序版本没有改变,我们已经完成了“无停机”部署(用户没有注意到新版本,也没有注销)5-6年约50个版本。

Edit2: The opposite is not true: Creating session in an application running .net framework 4, and then downgrading to .net 2 does not break the session. Edit2:反之亦然:在运行.net框架4的应用程序中创建会话,然后降级到.net 2不会破坏会话。 The opposite is true, however. 然而,事实恰恰相反。

In advance, thank you for any pointers 提前谢谢你的任何指示

After talking to MS pro support and a prominent member of the community who talked to the asp.net team, the fact that the sessions are not compatible between the app pool versions is by design. 在与MS专业支持人员以及与asp.net团队交谈的社区中的重要成员交谈之后,会话池应用程序池版本之间不兼容的事实是设计的。 It´s also not regarded as a bug or a breaking change by Microsoft, although I´m tempted to disagree. 它也不被微软视为一个错误或一个突破性的变化,虽然我很想不同意。 In conclusion - my findings were unfortunately correct and our future release will need some extra operational work to be as smooth as can be. 总而言之 - 我的调查结果不幸是正确的,我们将来的发布需要一些额外的操作工作才能顺利进行。

How about load balancing the farm to create "sticky sessions" to stick existing sessions to machines running .net 2.0 and any new sessions to machines running .net 4.0. 如何对服务器场进行负载平衡以创建“粘性会话”,以将现有会话粘贴到运行.net 2.0的计算机上,并将任何新会话粘贴到运行.net 4.0的计算机上。

Of course this depends on whether your project will withstand running 2 different versions of the project in production at the same time.... As I'm guessing that not only have the .net versions changed but also underlying code in your project. 当然,这取决于您的项目是否能够同时承受在生产中运行2个不同版本的项目....因为我猜测不仅.net版本已更改,而且项目中的底层代码也已更改。 For example will people modifying data in the database from 2 different versions of your project have an impact. 例如,人们从项目的2个不同版本修改数据库中的数据会产生影响。

Thus considering it a problem of running multiple versions of your own project, rather than of .net versions' sessions. 因此,考虑到运行自己项目的多个版本的问题,而不是.net版本的会话。 Looking at it in this angle may make it an easier problem to solve ... or much more difficult :-) depending on your project. 从这个角度来看待它可能会让它成为一个更容易解决的问题......或者更难:-)取决于你的项目。

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

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