Session is set to Nothing
Closed this issue · 5 comments
I'm using the following code as explained in the startup.vb file of my vb.net web forms app. The session is always set to nothing although the code is returned fine. I would greatly appreciate If someone could guide me here. Thanks in advance.
SessionTokenCache tokenCache = new SessionTokenCache(signedInUserId,
notification.OwinContext.Environment["System.Web.HttpContextBase"] as HttpContextBase);
Do you have a repository with your app that reproduces this? And when you say session is set to nothing, do you mean the SessionTokenCache object, or something else?
And to be clear, are you following the step-by-step but translating it to VB.NET?
Yes, I followed this step-by-step and I have 2 working mvc projects both in C# and vb.net. The problem occurs with the webforms project. When I apply the same stuff, the session in the notification.OwinContext.Environment["System.Web.HttpContextBase"] is set to nothing. This causes issues in creating the SessionTokenCache and the application fails.
Ok. It may be something going on with webforms + OWIN middleware. I haven't really done much with webforms so I don't know! I'll ask the OWIN guys if they have any helpful hints here.
Given this isn't a webforms project, I'm closing this issue. Please open an issue at http://katanaproject.codeplex.com/ if you're still having this problem.