question

GarethBarnes-5662 avatar image
0 Votes"
GarethBarnes-5662 asked ·

Does Azure WebApp support forms authentication with nested applications?

I'm testing migration of a system to Azure Web Apps from on-premise IIS. The system comprises two .Net Web Forms applications with one of them nested under the other and accessible via [baseurl]/admin. The nested application uses Forms authentication. I've used the configuration section of the main Web App in the Azure portal to add a Path mapping for /admin as an Application and have uploaded all the required code into the specified folder.

When I access the default login page under /admin I can enter my username and password as expected but when I do so although the url in the address bar changes to show the returnURL(defaultURL) specified in the web.config. I've managed to establish that the custom code I've written has successfully verified the username and password but when the FormsAuthentication.RedirectFromLoginPage method is called the next page does not find an authentication cookie. Running the exact same code as a stand alone Web App works fine so it seems to be a problem with the nesting of the application. Does anyone have an idea of why the nested application can't read the authentication cookie?

If I remove the web.config deny anonymous users restriction on the page that is being redirected to after login to allow access for all users the page displays the correct name for the logged in user so authentication has worked but for some reason it doesn't satisfy forms authentication.

azure-webappsazure-webapps-authentication
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @GarethBarnes-5662,

There isn't anything in Azure WebApp that would prevent you from doing this. Have you had an opportunity to enable diagnostic log and remote debug? That will help determine where the issue may lie.

Feel free to send your logs to AzCommunity[at]microsoft[dot]com ATTN: Ryan for any additional assistance.

0 Votes 0 · ·

0 Answers