Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We have a Node.JS application that converts a json file to a pdf file and this is being executed as a Process (node.exe) every time our C#.net Website calls it.

Now I need to move this Node.JS app project to IIS using IISNode. 

This Node.JS app doesn't have any entry point. There isn't any app.js and web.config file.

Below is the C# code to start the node.exe process.

        var json = JsonConvert.SerializeObject( job, Formatting.None, settings );

        var startInfo = new ProcessStartInfo
        {
            FileName = "node.exe",
            Arguments = "render",
            UseShellExecute = false,
            WorkingDirectory = rendererPath,
            RedirectStandardInput = true,
            CreateNoWindow = true
        };

        startInfo.RedirectStandardOutput = true;
        startInfo.RedirectStandardError = true;
        startInfo.StandardOutputEncoding = Encoding.UTF8;
        startInfo.StandardErrorEncoding = Encoding.UTF8;

        var result = new StringBuilder( "Starting Render at " + DateTime.Now + "\n" );


        using( var process = Process.Start(startInfo) ) {
            if( process == null ) {

        result.AppendLine( "Couldn't create process!" );

            throw new Exception( "Couldn't create render process." );
            }                
    


What I have tried:

I found these articles useful but its not the whole package i'm looking for.

http://www.hanselman.com/blog/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx
https://tomasz.janczuk.org/2011/08/hosting-express-nodejs-applications-in.html

i've installed the Node.JS and IISNode. I can run the Node in IIS But i cannot get to run the existing Node.JS app.

Any ideas and suggestions on how to approach this problem? It is really appreciated.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900