How to eliminate extra folder/characters being added to URL

AJ 1 Reputation point
2022-02-04T06:37:22.093+00:00

Recently, my Azure Web Apps have started automatically adding a subfolder after the domain to the URL in the client browser. E.g. Navigating to "CNAME.Domain.com/Default.aspx" will result in "CNAME.Domain.com/(S(35mbozxxkyo2w3u0ygpyp5jh))/Default.aspx" being returned/displayed in the client browser. What causes this and/or what do I need to do to eliminate this? Older sites on the same App Service don't have this, but as soon as I update/publish them, the behavior will start to occur.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,290 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Osjaetor 475 Reputation points
    2023-11-21T11:16:32.85+00:00

    Hi AJ,

    The extra characters you're seeing in the URL, specifically the /(S(35mbozxxkyo2w3u0ygpyp5jh))/, are typically related to ASP.NET session management. This syntax is used to encode session IDs in the URL. It's added when cookieless session state is enabled in your ASP.NET application.

    Verify the configuration of session state in your ASP.NET application. Open your web.config file and look for the <sessionState> element. Ensure that the cookieless attribute is not set to UseCookies.

    Regards,

    0 comments No comments