Help
by Biradar, Mallikarjuna (HYD)
Hi Team,
I have implemented cookie based Keycloak Authentication in my Asp.net MVC with C# & Jquery application. It's WORKING FINE in LOCAL when run from Visual Studio but not working when DEPLOYED to Web Server Hosted environment.
1.Accessing the Web Sever domain hosted Url, I am able to get KeyCloak Login screen as shown below.
[cid:image001.png@01D46C4D.60B3BA60]
2.Enter Username & Password that are configured for a user in Keycloak server and click on 'Access'.
Authentication is successful but I get error as shown in below screenshot instead of redirecting to View/Page or Action method in Controller class that has been set attribute [Authorize] and same Action method is set
as default in Gloabal.asx.cs fle.
[cid:image002.png@01D46C4D.E69C1FA0]
Please help me to resolve this issue.
My implementation:
1. startup.cs code
[cid:image003.png@01D46C4E.13D63000]
2. Global.asax.cs code:
[cid:image004.png@01D46C4E.613F6320]
3. Controller class - Action method
[cid:image005.png@01D46C4E.613F6320]
Regards,
Mallikarjun Biradar
Kantar Disclaimer<http://www.kantar.com/disclaimer.html>