How do I modify web.config to still allow iisnode debugger to be accessible? #262

Closed
chevex opened this Issue Feb 28, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@chevex

chevex commented Feb 28, 2013

I am running a node.js application under iisnode (Windows Azure Websites). By default iisnode gives access to a debugging tool at http://myapp.com/debug. However Windows Azure Websites overrides this (probably by accident) with a urlrewrite in web.config.

<system.webServer>
    <handlers>
        <add name="iisnode" path="app.js" verb="*" modules="iisnode"/>
    </handlers>
    <rewrite>
        <rules>
            <rule name="StaticContent">
                <action type="Rewrite" url="public{REQUEST_URI}"/>
            </rule>
            <rule name="DynamicContent">
                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
                </conditions>
                <action type="Rewrite" url="app.js"/>
            </rule>
        </rules>
    </rewrite>
    <iisnode
        debuggingEnabled="true"
        devErrorsEnabled="true"
        debuggerPathSegment="debug"
        nodeProcessCommandLine="&quot;%programfiles(x86)%\nodejs\node.exe&quot;"
        logDirectory="..\..\LogFiles\nodejs"
        watchedFiles="*.js;iisnode.yml;node_modules\*;views\*.jade;views\*.ejb;routes\*.js" />
</system.webServer>

I don't know much about web.config rewrite but it looks to me like <action type="Rewrite" url="app.js"/> is routing all requests to app.js (my main application file) as long as the request does not match an actual static file on the server. This is great except I don't want /debug to be routed to app.js, I want to let iisnode handle that request by default like it is supposed to. If I remove the <action /> rewrite /debug does indeed pull up the iisnode debugger, but then nothing else works of course :P

How can I modify this url rewrite to allow the /debug inspector to work?

@tjanczuk

This comment has been minimized.

Show comment Hide comment
@tjanczuk

tjanczuk Feb 28, 2013

Owner

The iisnode debugging feature is currently not available in the Windows Azure Websites. It requires cross-process communication mechanisms which are disabled at the OS level in the sandbox in which the applications execute.

Owner

tjanczuk commented Feb 28, 2013

The iisnode debugging feature is currently not available in the Windows Azure Websites. It requires cross-process communication mechanisms which are disabled at the OS level in the sandbox in which the applications execute.

@tjanczuk tjanczuk closed this Feb 28, 2013

@chevex

This comment has been minimized.

Show comment Hide comment
@chevex

chevex Feb 28, 2013

:'(

Thank you anyway :)

chevex commented Feb 28, 2013

:'(

Thank you anyway :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment