Search code examples
asp.netdockerhaproxyidentityserver4

Calling IdentityServer4 from application behind a HAProxy LoadBalancer


I have my IdentityServer4 setup with https on a my WebServer. I am able to browse to the IdentityServer and Login with my user.

Currently working on an application that is deployed to a docker host. Where I use a HAProxy for load balancing to my web application with SSL Termination at the loadbalancer.

If I click the SignIn Button in my web application I get redirected correctly to my IdentityServer and I am able to login. I then get redirected back to my web application but I then get an error saying that the message.State is empty or null

Where do I start looking here? To me the problem seems to be that my web application behind the HAProxy is using http and some how the state gets striped out.

Thanks for the help :-)


Solution

  • okay i got this figured out.

    the main problem were the x-forwarded headers that were not defined in my proxy. the second problem was that the firewall on my windows machine had to be opened to do a loop call.