【问题标题】:Webmatrix 2 broken网络矩阵 2 损坏
【发布时间】:2012-09-07 06:09:59
【问题描述】:

我错误地将运行的 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>

【问题讨论】:

    标签: node.js webmatrix


    【解决方案1】:

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

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

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

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

    【讨论】:

    【解决方案2】:

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

    从管理员命令提示符:

    在 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"
    

    【讨论】:

    • 当我运行它时,我得到File not found - iisnode_schema_x86.xml 0 File(s) copied。有什么建议吗?
    • 它为我成功复制了文件,但没有解决问题。
    【解决方案3】:

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

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

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

    【讨论】:

    • 如上所述,我遇到了 IISNode 架构问题。我的解决方法是按照 IISNode github 网站上的说明进行操作(比 Richard 的长,所以他的可能是更好的选择)问题很可能与安装正确版本的 IISNode 相关
    • 感谢 Neil,这是 IISNode 并删除了 IISNode 在 web.config 文件中不再使用的一些旧属性。
    • 完全有效,如果您仍在运行 2012 RC 并安装了 WebMatrix 2,将会有巨大的帮助。
    【解决方案4】:

    是的,您是对的,对 iisnode 的配置 serttings 进行了重大更改以支持新的日志记录设置。这就是需要新配置架构的原因。

    【讨论】:

      【解决方案5】:

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

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

      单击此按钮将确保安装了正确版本的 IIS 节点,并自动将新架构文件复制到 IIS Express 目录中。如果这对您不起作用,请告诉我们:)

      【讨论】:

      • 我实际上已经安装了这个(在尝试解决这个问题时这样做了)。所以......我猜它并没有解决我的问题。我还提了一个问题here
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-11
      • 2012-05-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多