Unable to use ASPPDF on Azure App Service - azure

I've been having trouble being able to use any of the functionality of ASPPDF on a web app I publish to Azure. When running the website locally through Visual Studio, the website behaves as expected, and I can use any of the methods in the ASPPDF library. However, when I publish to Azure and test the website I get this error: "Retrieving the COM class factory failed due to the following error: 80040154."
This error is documented here: http://support.persits.com/show.asp?code=ps071016166.
The Azure App Service I am publishing to is 64-bit as well as the project I am working on is configured for 64-bit. The libraries from ASPPDF are also 64-bit. Making any one of these 32-bit is not an option since the App Service must be 64-bit.
I have already viewed this: AspPDF and AspJPEG on Windows Azure. And I don't see how I can apply that solution to an App Service in Azure.
Has anyone had any success using ASPPdf on an Azure App Service?

Related

somepage.azurewebsites.net page can’t be found deployment ASP.NET Core 7 Web API

I know that question is rather amateur but I hope someone will give me a hint what I did it wrong.
I'm using:
Azure SQL Server database - I can access it from Azure db instance from my local SSMS
Azure App Service - also created, up and running
VS22 deployment => Publish => connect to my Azure account, and imported publish profile.
Deployment went well: and the code in release mode is published to Azure App Service.
But I can't see my Swagger page on my Azure website.
I'm using .NET 7
Maybe you can tell me what I'm missing here? Maybe I need to wait for instance of azure app service to be created? although I can access it and use all features that I paid.
Also, my logs are empty
I created a sample webapp in visual studio 2022 using .net 7
Image for reference:
I connected to my Azure sql database from SSMS to the webapp using visual studio.
Image for reference:
It connected successfully. I published it to Azure through Visual studio 2022.
For that I created an app service in azure.
Image for reference:
published into that APP.
Image for reference:
It published successfully.
Image for reference:
It run successfully after deployment.
In portal I go to API-->Api management and created new api for my app.
Image for reference:
I linked the Api Management and click on the Api which I created I got the swagger page
Image for reference:
In this way we can find the swagger page for an App in azure portal.

.Net 5 Azure App service missing dependencies

I've deployed my code to an app service using Azure Devops CI release agent. Once I browse to the App service, it shows this error, stating that .net 5 isn't installed, and lists what is.
'The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.'
This is what I have selected in the app service configuration, as it looks to be the only .Net 5 option.
Based on my test, the Azure App Service could support the .Net 5.
From the error message, it is indeed show that .net 5 hasn't been installed in the app service.
I could reproduce this issue too.
But when I select the .Net5 (Early Access) in Configuration and Save it, it will update the web app settings. Then the website could run successfully.
From your screenshot, you already selected this option. You could try to restart the App service and check if it could work.
On the other hand, you could try to create a new App Service with .Net5 (Early Access). Then you could directly use the App service with .Net 5.
Here is a ticket with the detailed introduction, you could refer to it.

How to build a netcore 3.0 Webapi and deploy to an Azure Linux app service

I have a netcore 3.0 Web api that I've developed and tested on Windows using Visual Studio 2019.
I have deployed it to a Windows Web app on a Windows app service plan. This runs as expected.
I then created a Linux app service plan with a net core 3.0 Linux Web app on azure using "executable" and not "Docker".
Next I attempted to publish my Web app from Visual Studio 2019 to this instance. It succeeds however my web app just gives the following fault
I have tried deploying as Linux-x64 and portable. I have also tried selecting framework dependent and self contained as the deployment mode.
Some simply show the error above, the other combinations just time out.
Is there an official MS guide to do what I am attempting to do above?
If not how can I diagnose the error. Can I remote in via SSH? Are there error logs anywhere?
Can I remotely debug the instance?
If not can I build and test the Linux version using the Linux subsystem for Windows?
If you're not sure about how to deploy your application, you can create a new Devops project on Azure portal and import your source code later.
Search for Devops Project
Select .NET as application from the template click Next
Select ASP.NET Core as application framework click Next
Select Linux Web App as a Service
Pass the necessary paramters in the next step and you are done
you should be able to compare and apply the same

azure cloud service node js "not a valid service package"

I have a cloud service in azure with two .NET worker roles and i want to add a Node JS webrole.
I have installed the Node.JS tools for visual studio which creates templates from which should allow node apps to be deployed as a web role.
Packaging of the service goes smoothly, but after publishing the cloud service via visual studio the following error message is shown:
The file provided is not a valid service package. Detailed error code: presentation Invalid application runtime - a runtime component is missing:/base/x64/WaIISHost.exe.
But when I look in the package file for the cloud service using an archiving tool and go to /base/x64/, the exe "WaIISHost.exe" is there.
I am quite stuck at the moment. There seem to be few other people that have this issue and I have already reinstalled the Azure SDK as suggested here and I am using the latest version (2.9.1).

Deploy to Azure Web App Virtual Application with Visual Studio Online Source Control Integration

We have an Azure Web App that we have Source Control integration setup with Visual Studio Online via the built in Azure functionality. This, of course, creates a build definition in our Visual Studio Online account. We have had this configured and it has worked just fine for deploying our website by queuing a build.
Our ultimate configuration is to actually create a Virtual Application and use the build to deploy to the Virtual Application instead of the web app site root.
So, we created the Virtual Application in the portal. See screenshot:
Our trouble comes in that we can't get the build definition to actually deploy to this virtual application. The build either fails or the files still end up in the site\wwwroot folder.
Our azure web app name is: inyoforum(staging)
We've tried numerous variations of the following MSBuild arguments:
/p:DeployIisAppPath="inyoforum__Staging/Forum"
/p:DeployIisAppPath="inyoforum__Staging\Forum"
/p:DeployIisAppPath="inyoforum(staging)/Forum"
/p:DeployIisAppPath="inyoforum(staging)\Forum"
We even tried other variations. We tried using a publish profile instead. We can get a publish from our local Visual Studio application to the virtual application, but we've been unable to do it from the build definition.
Any suggestions on other things to try?
You can create a publish profile to publish the website to virtual app and specify the profile in MSBuild Arguments. Steps like following:
Create a publish profile according to the instruction here: Deploying multiple virtual directories to a single Azure Website.
Check in the publish profile.
Create a new build definition and enter following strings in MSBuild arguments:
/p:DeployOnBuild=true /p:PublishProfile=xxxx.pubxml
Queue a new build with the definition, the web app will be deployed to virtual app.
You can also install MSDeploy Package Sync task and use it to deploy to virtual app. Please refer to this article for details: CUSTOM DEPLOY TASK TO DEPLOY VIRTUAL APPLICATIONS TO AZURE
I had this same problem and found virtual directories are not supported by MSDeploy PowerShell scripts. So I created a custom deployment task to support this use case. Give it try -
https://dotnetcatch.com/2016/03/22/vsts-release-custom-deploy-task-to-deploy-virtual-applications-to-azure/

Resources