Relative Content

Tag Archive for c#asp.netasp.net-webpages

Authenticate all page in asp.net webform project using Microsoft.Owin

I have a legacy asp.net web forms application built in .net framework 4.8 Recently it is being upgraded to use Azure AD Open Id authentication. I used Microsoft Owin Project Git project as reference to configure the authentication. Authentication is working fine. I am able to retrieve user claims as well. However, in my project there is no login page. If user tries to access any page & he is not authenticated then it should direct to the IdP authority url for login. In a sample project below code is used to redirect user to IdP login page.