0

I am trying to create below Azure Function. This run perfectly fine in local environment, however when deployed to Cloud, I get below Error.

Access to the path 'C:\Program Files (x86)\SiteExtensions\Functions\4.1.3\64bit\x64' is denied.

I am new to Azure functions, any help would be greatly appreciated. Below is the code. This seems to be a simple function, however I am not able to fix it. The line at which I am getting above mentioned error is pdfRenderer.Load(input);

I am using a nuget package Syncfusion.EJ2.PdfViewer for PdfRenderer. Not sure if this package has any limitation to load data from stream on serverless environment.

        public static void Run([EventGridTrigger] EventGridEvent eventGridEvent,
        [Blob("{data.url}", FileAccess.Read, Connection = "AzureWebJobsStorage")] Stream input,
        ILogger log)
        {
            PdfRenderer pdfRenderer = new PdfRenderer();
            pdfRenderer.Load(input);
            log.LogInformation(pdfRenderer.PageCount.ToString());
        }
VIRIYALA NARESH
  • 187
  • 1
  • 4
  • 17
  • [Reference](https://www.thebestcsharpprogrammerintheworld.com/2022/01/24/access-to-the-path-dhomesitewwwroothost-json-is-denied/#:~:text=If%20you%20a%20receive%20a,your%20Azure%20Function%20is%20hosted.),[Reference2](https://www.syncfusion.com/kb/12612/how-to-resolve-the-issue-access-to-the-path-is-denied-during-the-pdf-to-image-conversion-in) – RithwikBojja Feb 10 '22 at 07:14
  • Hello Rithwik, The **Reference** link you gave is over my head, I am not that good at Azure operations, hence I did not made any changes to the setting, However I did follow **Reference2** , but still I am getting the same error. – VIRIYALA NARESH Feb 10 '22 at 11:33
  • 1
    Can you try this [reference](https://ej2.syncfusion.com/aspnetcore/documentation/pdfviewer/how-to/resolve-pdfium-issue/) – RithwikBojja Feb 10 '22 at 11:51

0 Answers0