Last post May 06, 2016 02:59 AM by Candice Zhou
May 05, 2016 09:32 PM|ramiwahdan|LINK
I have Owin but i have 3 places where i ask for username and password. the startup page used in Owin Authentication. Is there a way in the startup file (or create more than one file) as it might be annoying for users to have to go to the startup page as
they know the page they want to go to!
In Short, I have main.aspx, forever.aspx and frederic.aspx --- they all have login screen but Owin will consider main.aspx (for Authentication) and will not allow the users to login the other pages unless they visit main.aspx first!
public void Configuration(IAppBuilder app)
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Main.aspx"),
May 06, 2016 02:59 AM|Candice Zhou|LINK
According to your description, I think you want to redirect to previous page after login. If so, you could use redirect user with QueryString "ReturnUrl" and get the url of the page, like below:
if (Request.QueryString["ReturnUrl"] != null)