Webmatrix 2 broken
Asked Answered
V

5

7

I made the mistake of upgrading webmatrix 2 that I had running to the latest version and now it's broken everything!

From the about screen this is what I am running:

Version 2.0

WebMatrix: 7.1.1674.0
IIS Express: 8.0.8418.0
.NET Framework: 4.0.30319.269 (RTMGDR.030319-2600)
Web Deploy: 7.1.1631.0
SQL Server Compact: 4.0.8854.1
Web Platform Installer: 7.1.1622.0
ASP.NET Web Pages: 2.0.20715.0

Everything was running perfect until I install the latest version of webmatrix 2 in which now I am getting this error:

iisnode was unable to read the configuration file. Make sure the web.config file syntax is correct. In particular, verify the iisnode configuration section matches the expected schema. The schema of the iisnode section that your version of iisnode requires is stored in the %systemroot%\system32\inetsrv\config\schema\iisnode_schema.xml file.

What the hell does this mean ???? schema?

Here is my web.config file I haven't changed anything in it, why is webmatrix complaining about it???

I've even try running the template examples but they display the same message as well. What have you done Microsoft to break things!!!???

                  <!-- Don't interfere with requests for logs -->
                  <rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
                       <match url="^[a-zA-Z0-9_\-]+\.js\.logs\/\d+\.txt$"/>
                  </rule>

              <!-- Don't interfere with requests for node-inspector debugging -->
              <rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">                    
                  <match url="^server.js\/debug[\/]?" />
              </rule>

                  <!-- First we consider whether the incoming URL matches a physical file in the /public folder -->
                  <rule name="StaticContent">
                       <action type="Rewrite" url="public{REQUEST_URI}"/>
                  </rule>

                  <!-- All other URLs are mapped to the Node.js application entry point -->
                  <rule name="DynamicContent">
                       <conditions>
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
                       </conditions>
                       <action type="Rewrite" url="server.js"/>
                  </rule>

             </rules>
        </rewrite>
        <!-- You can control how Node is hosted within IIS using the following options -->
      <iisnode      
        node_env="%node_env%"
        nodeProcessCommandLine="&quot;%programfiles%\nodejs\node.exe&quot;"
        nodeProcessCountPerApplication="1"
        maxConcurrentRequestsPerProcess="1024"
        maxNamedPipeConnectionRetry="3"
        namedPipeConnectionRetryDelay="2000"      
        maxNamedPipeConnectionPoolSize="512"
        maxNamedPipePooledConnectionAge="30000"
        asyncCompletionThreadCount="0"
        initialRequestBufferSize="4096"
        maxRequestBufferSize="65536"
        watchedFiles="*.js;node_modules\*;routes\*.js;views\*.ejs;middleware\*.js"
        uncFileChangesPollingInterval="5000"      
        gracefulShutdownTimeout="60000"
        loggingEnabled="true"
        logDirectoryNameSuffix="logs"
        debuggingEnabled="true"
        debuggerPortRange="5058-6058"
        debuggerPathSegment="debug"
        maxLogFileSizeInKB="128"
        appendToExistingLog="false"
        logFileFlushInterval="5000"
        devErrorsEnabled="true"
        flushResponse="false"      
        enableXFF="false"
        promoteServerVars=""
       />
      <!-- <iisnode watchedFiles="*.js;node_modules\*;routes\*.js;views\*.ejs;middleware\*.js"/>-->
      <!-- watchedFiles="*.js" -->
   </system.webServer>

Vandenberg answered 7/9, 2012 at 6:9 Comment(0)
V
4

The problem is how IISNode works to log messages now. I believe it's directly related to the console.log problems that myself and others complained about, and how it caused IISNode to crash often. IISNode now stores console.log messages in a separate folder called iisnode. It uses a different logging system and I am presuming it is more stable than the older server.js.logs system.

I found that these web.config settings are no longer useable:

- logDirectoryNameSuffix="logs"
- appendToExistingLog="false"
- logFileFlushInterval="5000"

If you remove these then everything works fine.

Vandenberg answered 8/9, 2012 at 0:37 Comment(1)
I also had to uninstall iisnode and reinstall the x64 package from github.com/tjanczuk/iisnode noted by Neil above.Reduplication
S
4

The quickest solution is to copy the correct schema into the iis express folder.

From an administrator command prompt:

on an x64 machine:

xcopy /y "%programfiles(x86)%\iisnode-dev\release\x86\iisnode_schema_x86.xml" "%programfiles(x86)%\IIS Express\config\schema\iisnode_schema.xml"

On an x86 machine:

xcopy /y "%programfiles%\iisnode-dev\release\x86\iisnode_schema_x86.xml" "%programfiles%\IIS Express\config\schema\iisnode_schema.xml"
Simmie answered 7/9, 2012 at 17:54 Comment(2)
When I run that, I get File not found - iisnode_schema_x86.xml 0 File(s) copied. Any advice?Fossa
It copied the file successfully for me, but didn't solve the issue.Diverse
V
4

The problem is how IISNode works to log messages now. I believe it's directly related to the console.log problems that myself and others complained about, and how it caused IISNode to crash often. IISNode now stores console.log messages in a separate folder called iisnode. It uses a different logging system and I am presuming it is more stable than the older server.js.logs system.

I found that these web.config settings are no longer useable:

- logDirectoryNameSuffix="logs"
- appendToExistingLog="false"
- logFileFlushInterval="5000"

If you remove these then everything works fine.

Vandenberg answered 8/9, 2012 at 0:37 Comment(1)
I also had to uninstall iisnode and reinstall the x64 package from github.com/tjanczuk/iisnode noted by Neil above.Reduplication
M
3

I also updated to WebMatrix 2 final today, and it broke IIS Express, preventing it from working with Visual Studio 2012 RC and WebMatrix itself. However, I was able to fix it by doing the following:

  • Uninstall IIS Express 8.0 from Add/Remove Programs
  • Uninstall IIS Express 7.5 from Add/Remove Programs
  • Run Web Platform Installer and reinstall IIS Express 8.0.

I also deleted the contents of my IISExpress folder from My Documents, but I'm not sure whether that was necessary.

Murry answered 7/9, 2012 at 13:58 Comment(3)
I hit the IISNode schema problem as described above. My fix was to follow the directions on the IISNode github site (which are longer than Richard's so his may be a better alternative) The issue may well be around getting the correct version(s) of IISNode installedColombo
Thanks Neil, it was IISNode and the removal of some old properties that IISNode no longer uses in the web.config file.Vandenberg
Totally worked Rich, tremendous help if you were still running 2012 RC and installed WebMatrix 2.Wormhole
S
0

Yes, you are correct, there were breaking changes to the configuration serttings for iisnode to support the new logging settings. That is why the new configuration schema is required.

Simmie answered 11/9, 2012 at 1:45 Comment(0)
A
0

We put together another easy way to fix this. You can just trigger a re-install of iisnode with this WebPI install link:

http://www.microsoft.com/web/handlers/webpi.ashx?command=GetInstallerRedirect&appid=iisnodedev32

Clicking this will ensure the right version of IIS Node is installed, and copy the new schema file over to the IIS Express directory automagically. Please, please let us know if this doesn't work for you :)

Aggressive answered 20/9, 2012 at 16:25 Comment(1)
I actually already had this installed (did it while trying to fix this problem). So... it didn't fix my problem I guess. I also made a question here.Fossa

© 2022 - 2024 — McMap. All rights reserved.