Share via

Azure Application Gateway - Cookie issue

Esa Riihimaki 1 Reputation point
2021-04-15T12:22:05.197+00:00

Hello

Login page of our web application is working with Application Gateway, but after login user will be logged out in 2 seconds. This maybe happening because application uses cookies and cookies are cleared and expired in 2 seconds. Web application is working in public and private network, but not behind Application Gateway.

--
Esa

Azure Application Gateway
Azure Application Gateway

An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.

0 comments No comments

1 answer

Sort by: Most helpful
  1. hossein jalilian 13,360 Reputation points Volunteer Moderator
    2024-01-10T06:04:43.0133333+00:00

    Hello Esa,

    Here are some steps you can take to troubleshoot and address the problem:

    1- Check the cookie affinity (session affinity) configuration on your Azure Application Gateway. Ensure that it is correctly set up to maintain user sessions across multiple requests.
    2- Check the logs of the Azure Application Gateway for any relevant information or errors.

    3- Ensure that the path and domain settings of the cookies generated by your backend match the settings expected by the Application Gateway.

    4- Use Azure PowerShell to enable detailed diagnostics on your Application Gateway.

    Set-AzApplicationGatewayDiagnostic -Name <ApplicationGatewayName> -ResourceGroupName <ResourceGroupName> -Enabled $true -Categories 'All'
    

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.