Issues using Chrome-Pdf recipie on IIS - iis

I am using the jsreport nuget packages in an asp.net core application. I am able to generate my pdf reports on my local machine however I run into an issue when I try to generate reports with the asp.net core application running in IIS. Whenever I attempt to run a report, it ultimately times out and gives me the following error:
Error rendering report: instance has been daemonized and initialized successfully (pid: 2480)A critical error occurred while trying to execute the render command: Timeout Error: pdf generation not completed after 40000ms
Some information about my setup:
The app is being hosed in IIS on a Server2008R2 machine
The IIS app is running under the Network Authority user.
I have given the application pool full permissions on the jsreport
folder deployed with the ASP.Net Core application.
I have give the application pool full permissions on the jsreport
folder in C:\Windows\Temp
Here is what I have been able to verify so far:
I can navigate to the jsreport folder in the deployed asp.net core
application, run jsreport start from the command line and enter
jsreport studio. From there I can run my reports with sample data
sizes comparable to what I would expect at runtime, and they export
to PDF just fine.
I can successfully make a request to the IIS hosted asp.net core application to render a plain HTML report.
The reports run just fine when being hosted on my local machine, outside of IIS.
It seems like there is some kind of issue with IIS accessing Chrome and doing the pdf conversion. Are there any additional steps I need to take to get chrome-pdf conversion working when hosting with IIS?

Related

Failed to Listen on the Given Port .net core 2.0 IIS

I am trying to publish a .netcore 2.0 application to a remote web server and host it using IIS. I have a custom domain setup and want to run it as www.mysub.mydomain.com. It is a web api application.
I have published the app to the server and when I run dotnet on the project manually, it runs. It runs off of localhost:5000 when I do this, and when I navigate to it on the server it works properly.
The problem comes when I try to run it via IIS after binding www.mysub.mydomain.com to the location. I get a 502.5 Process Failure error in my browser.
When I check the Event Viewer, I see that it says "created process with commandline 'dotnet .\myproj.dll' but failed to listen on the given port '21159'"
Any ideas?

PhantomJS in Azure WebJob? [duplicate]

I have deployed an asp.net mvc website in azure and I am trying to deploy phantomJS as a web job to support the web site.
I have uploaded a zip file with all the necessary dependencies to run PhantomJS and the web job starts successfully after running my batch file. The log reports that the server is up and running # 127.0.0.1:8080. However when I try to hit the PhantomJS app at url 127.0.0.1:8080 from my azure site hosted under someProject.azurewebsites.net it just times out with no other error message.
Specifically I am trying to deploy a phantomJS application that hosts a web endpoint (https://github.com/thelgevold/PhantomSnapshot) that will enable me to convert web pages to pdf if I pass a url from the website to the phantomJS process.
The website will pass a url to PhantomJS that will respond back with a pdf file that can be downloaded. I already have it working outside of Azure, but was curious if the PhantomJS process can be hosted as a web job
Does anyone know if it is possible to deploy PhantomJS in this manner?
I am running my site under the "free" configuration.
PhantomJS is not working on azure Webjobs.
I tried to execute it through CMD shell [yoursite].scm.azurewebsites.net/DebugConsole , but it hanges when I call it with raserize.js script.
you can use phantomjs as worker role, it will work.
Update
Regarding to this:
https://stackoverflow.com/a/23000040/3080500
phantomJS uses GDI to render images and pdf, and GDI is blocked in Azure Website
ref : GDI is not enabled in azure webisites http://social.msdn.microsoft.com/Forums/windowsazure/en-US/b4a6eb43-0013-435f-9d11-00ee26a8d017/report-viewer-error-on-export-pdf-or-excel-from-azure-web-sites
ref : PhantomJS uses GDI for rendering fonts : https://github.com/ariya/phantomjs/blob/6a01a8dece0c4dd697eaa0b208057d2bd43a30f3/src/qt/mkspecs/win32-msvc2003/qmake.conf#L63
We have the same issue with WSAS (Windows Azure Web Sites). We can run can communicate via stdin/stdout with phantomjs.exe, but when ever it does an actual network request, it will time out, or will freeze if a timeout is not set.
Some other applications can make network requests (f.e. curl.exe), but if you try running "ping", it will respond with "Unable to contact IP driver. General failure." googling which tells that there's likely a Hyper-V misconfiguration on their virtual servers.
Azure Websites will not allow you to listen on ports, also you cannot use localhost from within your Azure Website.

MVC Durandal app doesn't work when deployed to IIS

The platform is IIS on Win8.1
The project is created from the Durandal project template. No changes are made, and the project is run: the Durandal start kit appears in a web browser.
The project is deployed to a folder D:\Client
IIS manager is used to map a virtual application off the default web to D:\Client. The app pool for this is specified as DefaultAppPool which on my machine is set to FX4.0 and runs with my user credentials. Deliberately setting it to FX2.0 produces a 502 as expected. This implies that the FX version is not the problem.
http://localhost/Client produces the splash screen but the app hangs there. Using the browser's own debugger reveals that main has NOT been executed.
Loaded:
bootstrap.js
jquery-1.9.1.js
knockout 2.3.0.debug.js
require.js
Has anyone experienced this and what did you do to resolve it?
Virtual Directories are created to serve static content as far as I understand. ( Just a subfolder of another application ). As the StarterKit runs using MVC4/5 you need also ASP.NET support thus creating a normal application ( parallel to defaultapp ) should do the trick.
If you did that already that way maybe you're missing some files. Had a situation where some files weren't deployed ( eg. the views folder ). Double check if those are present.

Deploying lightswitch desktop application error

I am having difficulty in deploying my forst lightswitch desktop application.
when i try to publish, in the summary window it says
Database: Donot Publish
and the install.htm file is cofusing to me.
Can someone help me with a step by step tutorial.
I will be grateful.
I have installed Microsoft SQL server 2008.
The process of deploying a LightSwitch-based application differs depending on the application type and deployment scenario that you select. You have said that your lightswitch application is a desktop application. So, the possible deployment scenarios are:
Desktop client 2-tier
Desktop client, 3-tier
These links will help you :
Deploying LightSwitch Applications
How to: Deploy a 2-tier Application
How to: Deploy a 3-tier Application
You should try to get the exception info/stack trace from the server process (vslshost.exe) to get more information about the error when retrieving or saving data. If your app tries to load data when opening, change it so that there is no default screen. This will prevent the app from opening a screen when loading the app and trying to load data, allowing you enough time after opening the app to attach a debugger. You can follow my blog post at http://blogs.msdn.com/b/mthalman/archive/2013/08/16/how-to-get-a-stack-trace-in-lightswitch.aspx for info on how to get the exception info.

msdeploy mvc to Windows7 getting ERROR_DESTINATION_NOT_REACHABLE and 404

I'm trying to do msdeploy of a MVC app to a windows7 box, running on command-line. And kept getting this error:
Error Code: ERROR_DESTINATION_NOT_REACHABLE
More Information: Could not connect to the destination computer ("192.168.xxx.xxx"
). On the destination computer, make sure that Web Deploy is installed and that
the required process ("The Web Management Service") is started.
Error: The remote server returned an error: (404) Not Found.
Error count: 1.
I've verified both Wmsvc (seems this is being used) and MsDepSvc are running. And firewall are disabled. In the browser when I visit https://192.168.xxx.xxx:8172/msdeploy.axd, I got a Server Error 404, seems a bit further than where the command-line stopped.
Most of instructions on setting up IIS7 and Web deployment I could find online is for MS Servers. Both my local machine and the Windows7 machine has the same version of Msdeploy installed.
I had exactly the same issue with a VM on Azure, and the solution was to enable first the IIS Management Service and then install Web Deploy (I used Web Platform Installer). Seems that the installation order matters. You can find a blog entry I wrote about this here http://davidjrh.intelequia.com/2012/10/configurando-web-platform-installer-y.html
For non-server operating systems (i.e. Windows 7) the Web Deploy publish via Web Management Service is not supported. Instead you will have to use the Remote Agent Service, this is an admin only publishing service. You can find more info at http://technet.microsoft.com/en-us/library/dd569059(v=WS.10).aspx.
I had the same issue using MSDeploy to deploy my web application to remote IIS 7.5 web server running windows 7. I have just figured out how to fix the problem today after reading Sayed's post, so I wanna post my solution here for anyone who would run into this problem like me. Try this:
Enable IIS Management Service (in control panel >> add or remove features >> add or remove windows features)
Install Web Deploy (http://www.iis.net/downloads/microsoft/web-deploy)
Open cmd with Administrative privilege, type “net start msdepsvc” to start the “Web Deploy Agent Service”.
Check this link in your browser: http://serveraddress/MsDeployAgentService/, if it prompts for username and password, MsDeployAgentService is running on server, go to the next step.
In VS, type in http://serveraddress/MsDeployAgentService/ in Service URL while creating publish, instead of https://serveraddress:8172/MsDeploy.axd, and click test connection. It should be ok now.
After checking the Management Service and Web Deploy 3.0 were correctly installed, I found that (from VS2012 at least) the Service URL seems to matter here too, attempting to publish to any of the following did not work for me:
FQDN (localmachine.domain.local)
Domain IP Address (172.22.xxx.xxx)
Loop-back IP (127.0.0.1)
Whereas the following DID work:
localhost
NetBIOS name (localmachine)

Resources