node.js - Webmatrix 2 损坏

标签 node.js webmatrix

我错误地将我运行的 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 无法读取配置文件。确保 web.config 文件语法正确。特别是,验证 iisnode 配置部分是否与预期模式匹配。您的 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 现在如何记录消息。我相信这与我自己和其他人提示的 console.log 问题直接相关,以及它如何导致 IISNode 经常崩溃。 IISNode 现在将 console.log 消息存储在名为 iisnode 的单独文件夹中。它使用不同的日志记录系统,我认为它比旧的 server.js.logs 系统更稳定。

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

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

如果删除这些,则一切正常。

关于node.js - Webmatrix 2 损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12312625/

相关文章:

node.js - NodeJS 上的 CasperJS - 找不到模块 casper

mysql - 无法在同一个docker中连接nodejs和mysql

node.js - 使用 NodeJS 创建 CLI - 将变量传递给 exec linux 命令

javascript - HTML、WebMatrix、Razor 等新手处理 WebGrid

orchardcms - Orchard 1.8 出现 404 Not Found 错误 - 通过 Web Matrix 部署

asp.net-mvc - 如何在 Webmatrix.Data.Database 中创建事务提交和回滚

javascript - 我可以使用 webmatrix 发布网站吗

node.js - MongoError : driver is incompatible with this server version

javascript - Handlebars 部分位于部分内部

ASP.NET - Razor 静态变量生命周期?