Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unhandle exception while adding value to owin session #1

Open
genialguy1 opened this issue Mar 6, 2020 · 0 comments
Open

unhandle exception while adding value to owin session #1

genialguy1 opened this issue Mar 6, 2020 · 0 comments

Comments

@genialguy1
Copy link

genialguy1 commented Mar 6, 2020

im new to owin. I have a situation. I have 2 .net web forms applications. App_1 is a dashboard/landing page application. App_2 is the main application. App_1 is authenticated using the Identity server 4, it loads all the user profile and other data related to the business. then it goes to App_2. App_2 is the main website. So i need to carry the data from app_1 to app_2. before using owin it was done by http session. when i started using owin, the default session didnt work. so added this middle to both of my webform app. but when i redirect the user from app_1 to app_2, i simply get an unhandled exception.

This is what something im trying to do.
App_1:
var owinsession = HttpContext.Current.GetOwinContext().GetSessionContext();
owinsession.AddOrUpdate("test", "hello world");
Response.Redirect(url);
Im trying to retrieve this session variable in App_2. But once the redirection statement is exectuted
an exception is thrown in owinsession.AddOrUpdate() in this line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant