Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iisnode encountered an error when processing the request. #649

Open
dayhi opened this issue Nov 6, 2018 · 1 comment
Open

iisnode encountered an error when processing the request. #649

dayhi opened this issue Nov 6, 2018 · 1 comment

Comments

@dayhi
Copy link

dayhi commented Nov 6, 2018

iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error
You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The last 64k of the output generated by the node.exe process to stderr is shown below:

Application has thrown an uncaught exception and is terminated:
Error: EPERM: operation not permitted, lstat 'C:\Users\21490\Desktop'
    at Object.realpathSync (fs.js:1477:7)
    at toRealPath (internal/modules/cjs/loader.js:205:13)
    at Function.Module._findPath (internal/modules/cjs/loader.js:258:24)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:25)
    at Function.Module._load (internal/modules/cjs/loader.js:513:25)
    at Module.require (internal/modules/cjs/loader.js:643:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (C:\Program Files\iisnode\interceptor.js:210:1)
    at Module._compile (internal/modules/cjs/loader.js:707:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
@dayhi
Copy link
Author

dayhi commented Nov 6, 2018

web.config

<configuration>
  <system.webServer>

    <!-- indicates that the hello.js file is a node.js application 
    to be handled by the iisnode module -->

    <handlers>
        <add name="iisnode" path="index.js" verb="*" modules="iisnode" resourceType="Unspecified" requireAccess="Script" preCondition="bitness64" />
    </handlers>
    
    <rewrite>
            <rules>
                <rule name="all">
                    <match url="/*" />
                    <action type="Rewrite" url="index.js" />
                </rule>
            </rules>
    </rewrite>    
    
    <iisnode 
        node_env="%node_env%" 
        nodeProcessCountPerApplication="1" 
        maxConcurrentRequestsPerProcess="1024" 
        maxNamedPipeConnectionRetry="100" 
        namedPipeConnectionRetryDelay="250" 
        maxNamedPipeConnectionPoolSize="512" 
        maxNamedPipePooledConnectionAge="30000" 
        asyncCompletionThreadCount="0" 
        initialRequestBufferSize="4096" 
        maxRequestBufferSize="65536" 
        watchedFiles="*.js;node_modules\*;routes\*.js;views\*.ejs" 
        uncFileChangesPollingInterval="5000" 
        gracefulShutdownTimeout="60000" 
        loggingEnabled="true" 
        logDirectory="iisnode" 
        debuggingEnabled="true" 
        debugHeaderEnabled="false" 
        debuggerPortRange="5058-6058" 
        debuggerPathSegment="debug" 
        maxLogFileSizeInKB="128" 
        maxTotalLogFileSizeInKB="1024" 
        maxLogFiles="20" 
        devErrorsEnabled="true" 
        flushResponse="false" 
        enableXFF="false" 
        configOverrides="iisnode.yml" 
        nodeProcessCommandLine="C:\Program Files\nodejs\node.exe" 
        promoteServerVars="REMOTE_ADDR" />
        
        <defaultDocument>
            <files>
                <add value="index.js" />
            </files>
        </defaultDocument>
      
    <!--     
    
    One more setting that can be modified is the path to the node.exe executable and the interceptor:
    
    <iisnode
      nodeProcessCommandLine="&quot;%programfiles%\nodejs\node.exe&quot;" 
      interceptor="&quot;%programfiles%\iisnode\interceptor.js&quot;" />
    
    -->

  </system.webServer>
</configuration>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant