Webmatrix 2破碎

我犯了错误的升级webmatrix 2,我已经运行到最新版本,现在它已经打破了一切!

从关于屏幕这是我正在运行:

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 

一切都运行完美,直到我安装最新版本的webmatrix 2,现在我得到这个错误:

iisnode无法读取configuration文件。 确保web.config文件的语法是正确的。 特别是validationiisnodeconfiguration部分是否与预期的模式匹配。 您的iisnode版本所需的iisnode节的模式存储在%systemroot%\ system32 \ inetsrv \ config \ schema \ iisnode_schema.xml文件中。

这到底是什么意思? 架构?

这是我的web.config文件我没有改变任何东西,为什么是webmatrix抱怨呢?

我甚至尝试运行模板示例,但它们也显示相同的消息。 你做了什么微软打破事情?

  <!-- 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> 

现在的问题是IISNode如何工作来logging消息。 我相信这与我自己和其他人抱怨的console.log问题直接相关,以及它如何经常导致IISNode崩溃。 IISNode现在将console.log消息存储在名为iisnode的单独文件夹中。 它使用不同的日志logging系统,我认为它比旧的server.js.logs系统更稳定。

我发现这些web.config设置不再可用:

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

如果你删除这些,那么一切工作正常。

最快的解决scheme是将正确的架构复制到iis express文件夹中。

从pipe理员命令提示符处:

在x64机器上:

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

在x86机器上:

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

我今天也更新了WebMatrix 2 final,并打破了IIS Express,阻止它与Visual Studio 2012 RC和WebMatrix本身一起工作。 但是,我能够通过执行以下操作来修复它:

  • 从“添加/删除程序”中卸载IIS Express 8.0
  • 从“添加/删除程序”中卸载IIS Express 7.5
  • 运行Web平台安装程序并重新安装IIS Express 8.0。

我也从我的文档中删除了我的IISExpress文件夹的内容,但我不确定是否有必要。

是的,你是正确的,为了支持新的日志logging设置,对iisnode的configuration进行了重大更改。 这就是为什么新的configuration模式是必需的。

我们把另一个简单的方法来解决这个问题。 您可以使用此WebPI安装链接触发重新安装iisnode:

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

单击这将确保安装正确版本的IIS节点,并将新的模式文件自动复制到IIS Express目录。 请让我们知道如果这不适合你:)