Hi @Siripurapu Deepthi ,
I would like to ask if your code under the Web.Config configuration is:
<sessionState mode="InProc" timeout="xx"/>
If so, the reason is that the configuration saves session in the IIS process, which is unstable, resulting in the loss of session.You can fix the problem by changing the code to:
<sessionState mode="StateServer" stateConnectionString="xxxx" timeout="xxx"/>
Compared with InProc mode and StateServer mode, InProc mode acquires Session fast but is easy to lose, while StateServer mode acquires Session slowly but is not easy to lose. In addition to setting a timeout in the code, you need to modify the response configuration in IIS to prevent session from failing
IIS Manager - > Application Pool - > advanced settings
Modify [Fixed Interval] under the Recycle tab and [Idle Timeout] under the Process Model tab.
As for what you said, there may be problems due to the update of the version, which is usually backward compatible, but there may be some Ajax settings in your code or some writing formats that may have changed in the new version, you can check the following documentation:
https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/version-compatibility
https://learn.microsoft.com/en-us/previous-versions/aspnet/ms178581(v=vs.100)
Best regards,
Youqi
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.