我犯了将我运行的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=""%programfiles%\nodejs\node.exe""
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>
答案 0 :(得分:4)
最快的解决方案是将正确的架构复制到iis express文件夹中。
从管理员命令提示符:
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"
答案 1 :(得分:4)
问题是IISNode现在如何记录消息。我相信它与我自己和其他人抱怨的console.log问题直接相关,以及它如何导致IISNode经常崩溃。 IISNode现在将console.log消息存储在名为iisnode的单独文件夹中。它使用不同的日志系统,我认为它比旧的server.js.logs系统更稳定。
我发现这些web.config设置不再可用:
- logDirectoryNameSuffix="logs"
- appendToExistingLog="false"
- logFileFlushInterval="5000"
如果删除这些,那么一切正常。
答案 2 :(得分:3)
我今天也更新了WebMatrix 2决赛,它破坏了IIS Express,阻止它与Visual Studio 2012 RC和WebMatrix本身一起使用。但是,我能够通过执行以下操作来解决此问题:
我还从“我的文档”中删除了IISExpress文件夹的内容,但我不确定是否有必要。
答案 3 :(得分:0)
是的,您是对的,iisnode的配置设置有重大更改,以支持新的日志记录设置。这就是需要新配置架构的原因。
答案 4 :(得分:0)
我们将另一个简单的方法放在一起来解决这个问题。您可以使用此WebPI安装链接触发重新安装iisnode:
http://www.microsoft.com/web/handlers/webpi.ashx?command=GetInstallerRedirect&appid=iisnodedev32
单击此按钮将确保安装了正确版本的IIS节点,并将新架构文件自动复制到IIS Express目录。如果这不适合您,请告诉我们:)