locked
Can't publish to virtual directory on Azure RRS feed

  • Question

  • New to Azure.

    I am trying to publish an existing web app to a virtual directory on Azure.

    I went to Azure portal - Application Settings, scrolled down and typed in the following virtual directory and location:

    Funding      site\wwwroot\funding

    Application is checked.

    I publish from VS 2103 the same as when I was on my IIS server.  I get an HTTP 500 error first.  If I hit back several times I get the following:

    Server cannot access application directory 'D:\home\site\wwwroot\funding\'. The directory does not exist or is not accessible because of security settings

    The directory \funding is not being created.  My publish looks like this:

    I tried changing the output path of the HTML client to \funding but that did not work either.

    How do I create the physical path in VS 2013 so the virtual directory will work?

    Thank you for your time.

    Friday, December 9, 2016 3:03 AM

Answers

  • In Azure portal, you must add the virtual directory and tick the Application box.  Then you must download publishing profile and use the IIS path > Import Settings button  in LS pubwiz and then change the path to include the virtual directory. 

    Like so:

    https://blogs.msdn.microsoft.com/david_kidder/2014/07/28/how-to-host-multiple-cloud-business-apps-on-the-same-azure-web-site/

    HTH,

    Josh



    • Edited by joshbooker Sunday, December 11, 2016 1:52 PM link
    • Marked as answer by willContest Thursday, December 15, 2016 1:49 AM
    Sunday, December 11, 2016 1:50 PM
  • Hi Josh,

    Thank you for your reply.  I read your post and watched the video. I had very high hopes.

    The good news is the directory is now created. I can see it in the diagnostic console.  The bad news is I am still getting a HTTP 500.

    The following are the pertinent screens.  I have generated the client id and app secret a number of times. Actually went through the entire process a number of times.  Any idea at what point I erred that would cause a 500? I am going to continue trying.

    • Marked as answer by willContest Thursday, December 15, 2016 1:49 AM
    Thursday, December 15, 2016 1:04 AM

All replies

  • See the publishing part of this tutorial:

    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/3264/Creating-A-LightSwitch-SharePoint-2013-Multi-Tenant-Provider-Hosted-Application.aspx

    If you publish to azure there is no place where you would have put anything like "site\wwwroot\funding". Can you show a screen shot of the screen where you put that?

    In the end the wizard is trying to make a .app file on your local hard drive:


    http://AIHelpWebsite.com

    http://HoloLensHelpWebsite.com

    Friday, December 9, 2016 2:27 PM
  • I put that in the Applications settings. Here is pic.

    Image result for azure virtual directory

    Thanks for replying.

    Friday, December 9, 2016 3:25 PM
  • Sorry. This image apparently did not like being pasted.

    I reviewed the link you provided. I have gotten that to work. Problem is when I want to put it into a virtual directory so I can have multiple related apps under 1 web service.

    Friday, December 9, 2016 3:42 PM
  • Sorry. This image apparently did not like being pasted.

    I reviewed the link you provided. I have gotten that to work. Problem is when I want to put it into a virtual directory so I can have multiple related apps under 1 web service.

    I do not think that the LightSwitch publishing wizard will allow that.

    I have never tried it.


    http://AIHelpWebsite.com

    http://HoloLensHelpWebsite.com

    • Marked as answer by willContest Friday, December 9, 2016 8:23 PM
    • Unmarked as answer by willContest Thursday, December 15, 2016 12:52 AM
    Friday, December 9, 2016 7:40 PM
  • In Azure portal, you must add the virtual directory and tick the Application box.  Then you must download publishing profile and use the IIS path > Import Settings button  in LS pubwiz and then change the path to include the virtual directory. 

    Like so:

    https://blogs.msdn.microsoft.com/david_kidder/2014/07/28/how-to-host-multiple-cloud-business-apps-on-the-same-azure-web-site/

    HTH,

    Josh



    • Edited by joshbooker Sunday, December 11, 2016 1:52 PM link
    • Marked as answer by willContest Thursday, December 15, 2016 1:49 AM
    Sunday, December 11, 2016 1:50 PM
  • Hi Josh,

    Thank you for your reply.  I read your post and watched the video. I had very high hopes.

    The good news is the directory is now created. I can see it in the diagnostic console.  The bad news is I am still getting a HTTP 500.

    The following are the pertinent screens.  I have generated the client id and app secret a number of times. Actually went through the entire process a number of times.  Any idea at what point I erred that would cause a 500? I am going to continue trying.

    • Marked as answer by willContest Thursday, December 15, 2016 1:49 AM
    Thursday, December 15, 2016 1:04 AM
  • when I hit your site, I get:

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

    Which is a good sign - means something is there, but auth failed.  The most usual cause for that error is something with sharepoint permissions - usually having to do with clientid\secret.

    Is that the error you are getting or are you getting a '500 - internal server error' somewhere else?

    It's been forever since I used appregnew.aspx so I cannot recall exactly, but it's particular about the domain you enter - wants https or doesn't want https in the path (cannot recall?)

    I'd suggest using the seller dashboard to get your clientId/secret instead of appregnew.aspx

    Another thing to try is completely delete the app from sharepoint then upload the .app and deploy again.  The upgrade doesn't always work depending on how you deploy from app catalog in sharepoint so i make certain by deliberately, removing and checking version numbers.

    HTH,

    Josh

    Thursday, December 15, 2016 2:55 AM
  • Hi Josh, you are the man.  While I was looking at the diagnostic console I noticed the app was published under the root (from an earlier attempt) and the funding directory. So I deleted the entire app service from Azure and started again. Worked on first try.

    Thanks again.

    Thursday, December 15, 2016 3:58 AM
  • Ah yes.  That's another thing about using virtual dirs.  I've never been successful when LS app is published to the root directory.  Something LS does to the root site makes virtual dirs not work.

    Glad it worked out for you.

    Thursday, December 15, 2016 4:22 AM
  • Do you do consulting assignments?
    Saturday, August 26, 2017 5:43 AM
  • Who me?  I can neither confirm nor deny ;-), but post your email in the comments on my blog and lets chat.

    http://blog.joshuabooker.com/2016/01/18/ics/

    Cheers,

    Josh

    Monday, August 28, 2017 2:22 PM