vendredi 7 avril 2017

ASP.NET Session gets lost on subsequent request + Visual Studio Web Performance Test

I have this application hosted on local IIS. When runing application from browser, everything works fine (actually it's already been in production for a while and haven't received a single complain about session expiry/loss till date).

Coming to my questions. I recorded my test in VS Web performance Test and when executing, the session on subsequent request is not available.

While inspecting and matching the fiddler traces in both scenario, they have same traces still the web version works fine. The Web Performance Test fails!!!

I'm adding some screenshots as reference...

enter image description here

In the image above, endpoint - 'Upload/SaveUploadingMetaData' adds a Session with key 'GUID'. The next request 'Upload/UploadBlock?Chunk=xxxx' checks if session exists, if it does processes request else throws an exception.

when executing this behavior from browser, it always succeeds and from Web Performance Test, it throws error.

enter image description here

In the image above (for URL-'Upload/SaveUploadingMetaData') you can match the raw request for browser and WPT. In screenshot, you won't see Asp.Net_SessionId cookie but believe me it's there at the end.

enter image description here

In the image above (For the URL- 'Upload/UploadBlock?Chunk=xxxx'), you can see they are again identical.

While debugging application when requests are generated from Web Performance Test, and inspecting Session.SessionId on both the page, they have same value and still the application is not able to find the session!

The application is developed in ASP.NET MVC-5 with OWIN Pipeline. Let me know if more information is needed to help me solving this tricky problem!

And BTW, session is not expiring at all.

Aucun commentaire:

Enregistrer un commentaire