locked
Referencing Images And Documents On Azure Platform RRS feed

  • Question

  • My deployed web application is not referencing images and documents on Azure. Your kind assistance will be highly appreciated. 

    The snapshot of the Web config Content on the Localhost is pasted below.

    <default>
      <collation basePath="C:\Users\ITMANAGER\Documents\Visual Studio 2013\Projects\Brokerage\Brokerage.Web\PDFReport\" publicKey="cc03948993028304" />
    
     <fonts path="C:\Users\ITMANAGER\Documents\Visual Studio 2013\Projects\Brokerage\Brokerage.Web\PDFReport\ReportFont\">
        <font type="otf" name="BodonEgyptianBold" value="BodonEgyBol.otf" />
        <font type="otf" name="BodonEgyptianBoldItalic" value="BodonEgyBolIta.otf" />
        <font type="otf" name="BodonEgyptianItalic" value="BodonEgyIta.otf" />
        <font type="otf" name="BodonEgyptianRegular" value="BodonEgyReg.otf" />
        <font type="ttf" name="PalatinoBold" value="palab.ttf" />
        <font type="ttf" name="PalatinoBoldItalic" value="palabi.ttf" />
        <font type="ttf" name="PalatinoItalic" value="palai.ttf" />
        <font type="ttf" name="PalatinoRegular" value="pala.ttf" />
      </fonts>
    
      <images path="C:\Users\ITMANAGER\Documents\Visual Studio 2013\Projects\Brokerage\Brokerage.Web\PDFReport\Images\">
         <image name="FBNInsuranceLogo" value="boffbrokeragelogo.jpg" />
         <image name="FBNInsuranceLogoBig" value="boffbrokeragelogo2.png" />
      </images>
    
     <documents path="C:\Users\ITMANAGER\Documents\Visual Studio 2013\Projects\Brokerage\Brokerage.Web\PDFReport\Documents\">
        <document name="DirectDebitTemplate" value="DirectDebitTemplate.pdf" />
      </documents>
    </default>

    Azure Destinations:

    • Images: /site/wwwroot/PDFReport/Images
    • Documents: /site/wwwroot/PDFReport/Documents
    • ReportFont: /site/wwwroot/PDFReport/ReportFont

    My Questions.

    1. How do I properly referenced the ImagesDocuments and ReportFont in Web Config at the application root in Azure?

    2. I was able to override the Connection String to the SQL Database in Azure Application settings. In what section of the application settings in Azure can I override the Web Config settings for ImagesDocuments and ReportFont, and what are the syntaxes for them?



    • Edited by Lawrence Ajay Wednesday, May 23, 2018 11:27 AM
    • Moved by Femisulu-MSFT Thursday, May 31, 2018 8:30 AM better suited here
    Wednesday, May 23, 2018 11:09 AM

Answers

  • Thank you for your question. Are you able to set the paths like the below example?

    D:\home\site\wwwroot\PDFReport\Images


    Saturday, June 2, 2018 3:05 AM
    Owner
  • Just to highlight, there are 3 kinds of files that an Azure App Service can deal with:

    • Persisted Files
    • Temporary Files
    • Machine Level read-only files

     

    D:\home\site\wwwroot is the location where you site source code exists.

     

    Persisted Files: These files are rooted in the D:\home path.  The contents of these files are shared between all the multiple instances of your App Services.  Information about the file structure under the D:\home directory can be found here.

     

    Temporary Files: These files, stored in the D:\Local are accessible only from the individual instance of the App Service Plan.

     

    Machine Level read-only files: The Azure App Service is able to access standard Windows locations like %ProgramFiles% and %windir% but cannot be modified.  Some more information about this topic can be found here.

     

    At its core, App Service is a service running on top of the Azure PaaS (platform as a service) infrastructure. As a result, the local drives that are "attached" to a virtual machine are the same drive types available to any worker role running in Azure. See, File access document for more details on the C\ and D\ drives. These cannot be modified.

    Refer Understanding the Azure App Service file system for more details on this topic.

    Wednesday, June 13, 2018 9:01 AM
    Owner

All replies

  • Thank you for your question. Are you able to set the paths like the below example?

    D:\home\site\wwwroot\PDFReport\Images


    Saturday, June 2, 2018 3:05 AM
    Owner
  • Thank you so much Mr. Bryan It worked perfectly. Now I can generate PDF document from my app. is Azure Cloud D drive? or how come D? Your explanation will be highly appreciated. Again, is it possible to override these settings in Azure portal?

    Thank you so much,

    Lawrence

     
    Saturday, June 2, 2018 8:21 PM
  • Just to highlight, there are 3 kinds of files that an Azure App Service can deal with:

    • Persisted Files
    • Temporary Files
    • Machine Level read-only files

     

    D:\home\site\wwwroot is the location where you site source code exists.

     

    Persisted Files: These files are rooted in the D:\home path.  The contents of these files are shared between all the multiple instances of your App Services.  Information about the file structure under the D:\home directory can be found here.

     

    Temporary Files: These files, stored in the D:\Local are accessible only from the individual instance of the App Service Plan.

     

    Machine Level read-only files: The Azure App Service is able to access standard Windows locations like %ProgramFiles% and %windir% but cannot be modified.  Some more information about this topic can be found here.

     

    At its core, App Service is a service running on top of the Azure PaaS (platform as a service) infrastructure. As a result, the local drives that are "attached" to a virtual machine are the same drive types available to any worker role running in Azure. See, File access document for more details on the C\ and D\ drives. These cannot be modified.

    Refer Understanding the Azure App Service file system for more details on this topic.

    Wednesday, June 13, 2018 9:01 AM
    Owner
  • Thank you so much for the comprehensive details professionally analysed and clarified. This is greatly appreciated. your explanations are just quite understood.

    Sincerely appreciative of your time and effort taken for these details.

    Kind regards

    Lawrence

     
    Wednesday, June 13, 2018 9:24 PM
  • Glad you found the information helpful. Thank you for the nice feedback.

    Thursday, June 14, 2018 3:52 AM
    Owner