WsFederation Authentication login loop

后端 未结 1 739
无人共我
无人共我 2021-01-22 07:58

I am experiencing a problem with a login loop when using WsFederation Authentication in my MVC web application. I used visual studio to create the scaffolding of th

1条回答
  •  暖寄归人
    2021-01-22 08:31

    The cause of the problem was the request and response URLs where not the same. I.e. When a user entered the website URL and did not prefix it with HTTPS the redirect loop would occur.

    The cause was hidden because the user is immediately redirected to ADFS if they are not authenticated or authorized.

    All I had to do was to ensure that all user requests are redirected back to the HTTPS URL and that the HTTP binding is removed.(Either or would have worked just fine)

    This is the code I used to ensure that all requests are redirect to https.

      
        
          
            
              
              
                
                
              
              
            
          
        
      
    

    I hope this post was helpful.

    0 讨论(0)
提交回复
热议问题