web application not logging in after upgrading my system to windows 10 and visualstudio 2019. The application is built on MVC 4.
on adding session_start method to in global .aspx.cs, the session _start is being hit twice hence loosing the session elements which was set in the first.
tried hosting the application in local IIS as well as debugging in iis express.
This application works fine is windows 7 visual studio 2019.
session_start is invoked by every controller(being called by login as well as home controller)
<sessionStatetimeout="2880" /> (working in old laptop with windows 7 and visual studio 2019. The same has been deployed in production. and working as expected for couple of years.)
but has not worked for us in new system.( windows 10 and visual studio 2019)
Session is not used for forms authentication. Please explain what not working means. Old passwords not working, register not working, never asks for authorization?
<sessionStatetimeout="2880" /> (working in old laptop with windows 7 and visual studio 2019. The same has been deployed in production. and working as expected for couple of years.)
but has not worked for us in new system.( windows 10 and visual studio 2019)
Session and forms authentication are two different frameworks. Does the application have custom code that uses Session to store user information?
You are not forth coming with information. Again, forms authentication and Session are two different frameworks. As asked above can you explain what is not working and the steps to reproduce the problem? Can you explain clear;y and openly how security
works in your application? Have you created custom security that uses Session rather than forms authentication? Is the actual problem Session is not persisting?
If you also have a win7 environment, you can capture HTTP traffic in win7 and win10 environments respectively, and then compare the differences between them.
Best Regards,
YongQing.
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
None
0 Points
8 Posts
Web application not logging in after upgrading my system to windows 10 and visualstudio 2019 buil...
Oct 14, 2019 07:01 AM|Ganesh Uchil|LINK
Hi
web application not logging in after upgrading my system to windows 10 and visualstudio 2019. The application is built on MVC 4.
on adding session_start method to in global .aspx.cs, the session _start is being hit twice hence loosing the session elements which was set in the first.
tried hosting the application in local IIS as well as debugging in iis express.
This application works fine is windows 7 visual studio 2019.
session_start is invoked by every controller(being called by login as well as home controller)
Contributor
3710 Points
1043 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Oct 15, 2019 07:31 AM|Yongqing Yu|LINK
Hi Ganesh,
According to your description, which login authentication type does your project use? Windows or form or identity or membership?
And we hope you can also provide sessionstate settings in your web.config, which will help us solve your issue more easily.
Best Regards,
YongQing.
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
None
0 Points
8 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Oct 15, 2019 08:57 AM|Ganesh Uchil|LINK
HI YongQing,
Thank you for the response.
We are using form authentication.
we tried couple of sessionState configuration
<sessionStatetimeout="2880" /> (working in old laptop with windows 7 and visual studio 2019. The same has been deployed in production. and working as expected for couple of years.)
but has not worked for us in new system.( windows 10 and visual studio 2019)
below are the other combinations we have tried.
<sessionState mode="InProc" sqlCommandTimeout="3600" timeout="120" cookieless="false" />
<httpCookies httpOnlyCookies="true" requireSSL="true" />
<sessionState mode="InProc" sqlCommandTimeout="3600" timeout="120" cookieless="false" />
<httpCookies requireSSL="false" />
But none of the above work.
Thanks and regards
Ganesh
All-Star
57884 Points
15513 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Oct 15, 2019 09:56 AM|bruce (sqlwork.com)|LINK
All-Star
52261 Points
23315 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Oct 15, 2019 10:55 AM|mgebhard|LINK
Session and forms authentication are two different frameworks. Does the application have custom code that uses Session to store user information?
None
0 Points
8 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Oct 15, 2019 05:26 PM|Ganesh Uchil|LINK
Yes the application has custom code to store user information
All-Star
52261 Points
23315 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Oct 15, 2019 08:37 PM|mgebhard|LINK
You are not forth coming with information. Again, forms authentication and Session are two different frameworks. As asked above can you explain what is not working and the steps to reproduce the problem? Can you explain clear;y and openly how security works in your application? Have you created custom security that uses Session rather than forms authentication? Is the actual problem Session is not persisting?
None
0 Points
8 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Oct 16, 2019 11:00 AM|Ganesh Uchil|LINK
Hi ,
The issue is session_start is invoked by every controller(being called by login as well as home controller)
the application has custom security that uses Session to store some user information.
Ganesh
All-Star
52261 Points
23315 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Oct 16, 2019 11:17 AM|mgebhard|LINK
The actual issue is Session does not persist after upgrading the OS? Or did you move the application to a new host? Perhaps a shared hosting service?
Losing Session can be due to the application restarting or using a load balance environment.
None
0 Points
8 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Oct 16, 2019 12:07 PM|Ganesh Uchil|LINK
The actual issue is Session does not persist after upgrading the OS windows 10.
the problem started only after i upgraded the OS to windows 10
Contributor
3710 Points
1043 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Oct 17, 2019 05:25 AM|Yongqing Yu|LINK
Hi Ganesh,
Form authentication typically set cookies to make sure user logged in, I suggest you use Fiddler to capture HTTP traffic.
How to use Fiddler to capture HTTP traffic, you can refer to this:
Introduction to using Fiddler for monitoring HTTP(s) requests.
If you also have a win7 environment, you can capture HTTP traffic in win7 and win10 environments respectively, and then compare the differences between them.
Best Regards,
YongQing.
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
None
0 Points
8 Posts
Re: Web application not logging in after upgrading my system to windows 10 and visualstudio 2019...
Nov 21, 2019 10:26 AM|Ganesh Uchil|LINK
HI All Thank you for the responses.
The issue was solved once we reinstalled the windows 10 with oem os
Ganesh