I'm using asp.net core 2.2 and INodeServices for interoperability between C# and Node. The problem is that my Node invocation works great on my development environment, but once I push my code to Azure App Service and then execute the invocation (trough an MVC controller), it seems unable to locate the Node code to execute and after waiting a bit, it throws an error.
I've found by using Kudu that my node_modules Folder, as well as my Node folder, don't get copied to the publish directory on deployment unless I configure them to do so by setting the following code on my .csproj file.
this doesn't seem to solve the problem, but i think that my NodeCode Folder should be deployed next to my node_nodules because of dependencies.
Thanks for your time.
As of right now, the INodeServices invocation works great on my development environment, but once deployed to Azure, it fails after a long wait.
<Content Include="NodeCode\ePaycoCash.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="NodeCode\ePaycoCustomers.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="NodeCode\ePaycoPayments.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="NodeCode\ePaycoPlans.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="NodeCode\ePaycoPSE.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="NodeCode\ePaycoSubscriptions.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="NodeCode\ePaycoTokens.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="node_modules\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>`
Update:
under LogFiles/DetailedErrors I found this:
Most likely causes:
IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
IIS was not able to process configuration for the Web site or application.
The authenticated user does not have permission to use this DLL.
The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.
Things you can try:
Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
Check the event logs to see if any additional information was logged.
Verify the permissions for the DLL.
Install the .NET Extensibility feature if the request is mapped to a managed handler.
Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.