You won't have access to processes like explorer inside an app service; see Operating system functionality on Azure App Service and Azure Web App sandbox for more details. Furthermore, from a web perspective, the client has to request to open/download the PDF file you've generated. On your local environment, you're the client which is why it works. To do similarly, when client makes the request to your app which generates your PDF, your app will need to respond with application/pdf HTTP response.
Open PDF in Azure
JORGE MALDONADO BARRERA
211
Reputation points
I have a website in an Azure App Service that generated a pdf. The pdf generates correctly inside a project folder but I also want to open it. I tried the Process.Start("explorer.exe", fileName) which only works when running my project locally and also Process.Start(fileName) which does not open anything. I also tried the following solution without success:
https://www.learmoreseekmore.com/2021/07/dotnet5-web-api-display-pdf-in-browser.html
I will appreciate any feedback.
Regards,
Jorge
1 answer
Sort by: Most helpful
-
Ryan Hill 28,716 Reputation points Microsoft Employee
2022-11-21T06:01:55.997+00:00