none
[Java][Web Apps] You do not have permission to view this directory or page. RRS feed

  • Question

  • Hello!  I am new user of the Azure App Service.  I created a new web app with the url http://flstat.azurewebsites.net/

    I uploaded the source code (.war file) to my github account and used the continuous deployment option to deploy my code.

    When I click on the url, I receive the following message:

    You do not have permission to view this directory or page.

    I do not know what I am doing wrong and what I need to do to get my web app to work.  Please help!

    Thanks,

    raov5



    Tuesday, February 2, 2016 8:33 PM

Answers

  • Hi Raov5,

    have you configured your site to run Java application?

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-java-get-started/

    once it is configured, make sure you place your war file under webapps folder. see below links for details

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-java-add-app/

    Quote from above link

    Once you have initialized your Java web app in Azure App Service as documented at Create a Java web app in Azure App Service, you can upload your application by placing your WAR in thewebapps folder.

    The navigation path to the webapps folder differs based on how you set up your Web Apps instance.

    • If you set up your web app by using the Azure Marketplace, the path to the webapps folder is in the form d:\home\site\wwwroot\bin\application_server\webapps, whereapplication_server is the name of the application server in effect for your Web Apps instance.
    • If you set up your web app by using the Azure configuration UI, the path to the webappsfolder is in the form d:\home\site\wwwroot\webapps.

    Tuesday, February 2, 2016 9:34 PM
  • Hi,

    Per my experience, I think you can try to check two points for the issue.

    1. Check your github repository, the war file must be added into the webapps dir at the root of the repo, please see the pic below.

    2. Regarding the permission issue for App Service Authentication enabled, please make sure that is disabled by editing the Web App's application settings as below.

    Hope it helps. Best Regards.

    Wednesday, February 3, 2016 8:36 AM
    Moderator

All replies

  • Try enabling diagnostic logging to see if you can get more information about the failure.  There are multiple different types of logs you can enable: https://azure.microsoft.com/en-us/documentation/articles/web-sites-enable-diagnostic-log/

    Can you share the log output that you find here? We may be able to point you in the right direction with the log data.

    Tuesday, February 2, 2016 9:29 PM
  • Hi Raov5,

    have you configured your site to run Java application?

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-java-get-started/

    once it is configured, make sure you place your war file under webapps folder. see below links for details

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-java-add-app/

    Quote from above link

    Once you have initialized your Java web app in Azure App Service as documented at Create a Java web app in Azure App Service, you can upload your application by placing your WAR in thewebapps folder.

    The navigation path to the webapps folder differs based on how you set up your Web Apps instance.

    • If you set up your web app by using the Azure Marketplace, the path to the webapps folder is in the form d:\home\site\wwwroot\bin\application_server\webapps, whereapplication_server is the name of the application server in effect for your Web Apps instance.
    • If you set up your web app by using the Azure configuration UI, the path to the webappsfolder is in the form d:\home\site\wwwroot\webapps.

    Tuesday, February 2, 2016 9:34 PM
  • Hi Xiaomin

    Thanks for your response.  I was able to configure my site to run the Java application.  However, I am confused about placing the war file under the webapps folder.  The link you sent me unfortunately did not help - its most likely user-error.

    Specifically, can you please tell me where the webapps folder is?  And how do you mean place war file under the webapps folder?  Right now, I am using the Continuous Deployment option under the Publishing section to connect to my war file in my github account.

    Looking forward to hearing from you.

    Thanks,

    raov5

    Tuesday, February 2, 2016 10:03 PM
  • Thank you Chris.  I am trying a couple of more obvious things that I may have missed.  If none of those work, I will send you the diagnostic logs.

    - raov5

    Wednesday, February 3, 2016 1:03 AM
  • I updated my original answer.

    i think for your case locally, create a "webapps" folder and place your war file inside the "webapps" folder. once deploy you will find it "d:\home\site\wwwroot\webapps"  from https://flstat.scm.azurewebsites.net/debugconsole

    Wednesday, February 3, 2016 3:05 AM
  • Hi,

    Per my experience, I think you can try to check two points for the issue.

    1. Check your github repository, the war file must be added into the webapps dir at the root of the repo, please see the pic below.

    2. Regarding the permission issue for App Service Authentication enabled, please make sure that is disabled by editing the Web App's application settings as below.

    Hope it helps. Best Regards.

    Wednesday, February 3, 2016 8:36 AM
    Moderator