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
Developer technologies ASP.NET ASP.NET Core
4,815 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,931 questions
1 answer
Sort by: Most helpful
-
Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
2022-11-21T06:01:55.997+00:00