I am using HiQPdf DLL to convert my HTML into PDF. It works on all server but when i deployed this to Azure ,it throws an error. Below is the error:-
"HiQPdf.HtmlToImage HTML layout error"
Thanks for your help in Advance.
Please check the HiQPdf HTML to PDF Converter for .NET FAQ regarding the Azure deployments. Below I copied the information from that page.
Basically you can use the HiQPdf library in Windows Azure Cloud Services and Virtual Machines but not in Web Sites because the Web Sites run in a restricted sandbox. Using Visual Studio you can easily transform an existing ASP.NET 4.0 or MVC application into a Web Role by adding a cloud service project to the solution containing your project. For this, open your solution, right click on the ASP.NET project and select the 'Add Windows Azure Cloud Service Project' option from menu. Right click on the added cloud service project and select the 'Package' option to produce a package and a configuration file you can deploy as an Azure Cloud Service.
Related
I want to publish my single page app to Azure. I have created the App Service, App Service Plan and downloaded the publish profile settings on my local. Now I can use FTP to publish it to Azure. But I am wondering if there is a way I can configure this in the my Visual Studio similar to what we do when publishing a .Net application (MVC or Web API) as shown below in the snapshot.
My single page application is not part of the solution. This is how the structure of my projects look like.
It has one .Net Core Web API project and one Single Page App created in Vue.js. I can publish the Web API project from the Visual Studio but not the SPA. Any help with this please?
Per my knowledge, it is impossible to publish it in Visual Studio similar to what we do when publishing a .Net application. There is no Publish... option for us to choose.
As a workaround, we can upload our SPA project to Azure web app via KuDu.
More information about KuDu, we can refer to: Using KUDU with Microsoft Azure Web Apps
We just need to drag the SPA project into KUDU under wwwroot folder as below:
I'm trying to convert my page to PDF using HiQPDF. The code works fine when I run it on my local machine (through localhost), but when I push it to the server, I receive this error:
HTML from URL layout error
Here's some example code:
HtmlToPdf htmlToPdfConverter = new HtmlToPdf();
htmlToPdfConverter.ConvertUrlToFile("https://website.com/12345", filePath);
filePath is the path where the PDF should be created. Path is correct and the folders are all created. When I go to https://website.com/12345 as my site, I can view the page fine. Even in incognito. If I simply replace website.com with localhost it works fine locally.
The error suggests there's a problem with the code of the page.. right? What could the issue be?
Are you using this in an Azure web app? If so, it's not supported. If you're using Azure it would need to be deployed to a web role running in a cloud service.
You can use the HiQPdf library in Windows Azure Cloud Services and Virtual Machines but not in Web Sites because the Web Sites run in a restricted sandbox. Using Visual Studio you can easily transform an existing ASP.NET 4.0 or MVC application into a Web Role by adding a cloud service project to the solution containing your project. For this, open your solution, right click on the ASP.NET project and select the 'Add Windows Azure Cloud Service Project' option from menu. Right click on the added cloud service project and select the 'Package' option to produce a package and a configuration file you can deploy as an Azure Cloud Service.
http://www.hiqpdf.com/FAQs.aspx
I have a problem related to crystal report in azure server.I followded the below link and did all setting as per mentioned.But to create the last step i need a "ServiceDefinition.csdef".Can anyone help where shall i get this?
Thie link is-
http://www.britishdeveloper.co.uk/2012/01/crystal-reports-on-azure-how-to.html
It is not clear from the link that you provided, but when you adding a new project to your solution with Windows Azure Cloud Service template you will find ServiceDefinition.csdef file in this new project.
In Windows Azure Cloud Service project you can manage all required stuff to deploy your WCF service to the Azure.
See this link about hosting your wcf service on the Azure Cloud
when you adding a new project to your solution with Windows Azure Cloud Service template, you will find the ServiceDefinition.csdef file
I published my ASP .NET Web API 2 project to Azure as an API app. I used Visual Studio 2013 and got this lovely screen after publishing.
But the API app is no where to be found in my Azure portal.
I looked in my Visual Studio Server Explorer and it is there.
I got the same result as yours after publishing the API app, it's just not listed when clicking Browse > API Apps. Although it says "Web, Mobile and API apps are now in one list", it obviously doesn't work as it says.
Anyway, you can alternatively find your API app in the resource group which you specified in the publishing profile:
Or, just right click the API app in Server Explorer and select "Open in Management Portal" option to open it in the portal:
In a new solution in VS2013, I am following the instructions on migrating an ASP Web Application to an Azure Web Role.
I created a new ASP.Net Web Application project in my solution. Right-clicking on the project does not render the option Add Windows Azure Deployment Project, and am unable to locate a VS2013-related fix.
I added a new Azure Cloud Service/WebRole project to the solution, and am wondering if I can just take guts from the first Web App and move them to the Web Role (I didn't see any new name spaces in the classes I looked at)?
The solution should contain both the Azure Cloud Service/WebRole project and the ASP.Net Web Application project. Then in the Azure Cloud Service/WebRole project, right-click on the "Roles" folder >> Add >> Web Role Project in solution.