<wbr><wbr>刚看到有人说IIS7Express有下载,于是马上屁颠屁颠地跑去下载了一个,然后安装. <p>装完后发现,我擦,居然没有WIN7下的管理界面,汗一个,于是跑到安装目录下C:\Program Files\IIS Express>寻找之,发现iisexpress.exe</p> <p> 双击启动,发现自动绑定了8080端口,然后运行了一下appcmd.exe,按照命令行的提示,随便跑了几个网站起来。但是马上就遇到了这个问题:</p> <div> <div> <h3>HTTP 错误 500.22 - Internal Server Error</h3> <h4>检测到在集成的托管管道模式下不适用的 ASP.NET 设置。</h4> </div> <div> <fieldset> <h4>最可能的原因:</h4> <ul> <li>此应用程序在 system.web/httpModules 节中定义配置。</li> </ul> </fieldset> </div> </div> <p><wbr>按照他的提示,需要"从 IIS Express 安装目录运行 <strong>appcmd migrate config "Default Web Site/"</strong>。使用 AppCmd 迁移应用程序将使它能够在集成模式下工作,并能继续在经典模式下和以前版本的 IIS 上工作。"</wbr></p> <p>但是如果你照做的话,就会出现:"C:\Program Files\IIS Express>appcmd migrate config "WebSite1/wxymap"</p> <div> <div>命令“MIGRATE”在对象“CONFIG”上不受支持。请运行“appcmd.exe CONFIG /?”<wbr>显示支持的命令。"</wbr> </div> <p><wbr>我了个去,这不是自摆乌龙么?压根就不支持的命令搞什么飞机?</wbr></p> <p>解决办法如下:在安装目录中有一个 appcmd.xml。用文本编辑器打开发现:</p> <div> <div> <span style="CoLor: #0000ff"><</span><span style="CoLor: #800000">object<wbr></wbr></span><span style="CoLor: #ff0000">name</span><span style="CoLor: #0000ff">="config"</span><span style="CoLor: #ff0000"><wbr>alias</wbr></span><span style="CoLor: #0000ff">="configs"</span><span style="CoLor: #ff0000"><wbr>classId</wbr></span><span style="CoLor: #0000ff">="DefaultConfigObject"</span><span style="CoLor: #ff0000"><wbr></wbr></span><span style="CoLor: #0000ff">></span><span style="CoLor: #000000"><br><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></span><span style="CoLor: #0000ff"><</span><span style="CoLor: #800000">verb<wbr></wbr></span><span style="CoLor: #ff0000">name</span><span style="CoLor: #0000ff">="list"</span><span style="CoLor: #ff0000"><wbr>classId</wbr></span><span style="CoLor: #0000ff">="DefaultConfigObject"</span><span style="CoLor: #ff0000"><wbr><wbr></wbr></wbr></span><span style="CoLor: #0000ff">/></span><span style="CoLor: #000000"><br><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></span><span style="CoLor: #0000ff"><</span><span style="CoLor: #800000">verb<wbr></wbr></span><span style="CoLor: #ff0000">name</span><span style="CoLor: #0000ff">="set"</span><span style="CoLor: #ff0000"><wbr>classId</wbr></span><span style="CoLor: #0000ff">="DefaultConfigObject"</span><span style="CoLor: #ff0000"><wbr></wbr></span><span style="CoLor: #0000ff">/></span><span style="CoLor: #000000"><br><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></span><span style="CoLor: #0000ff"><</span><span style="CoLor: #800000">verb<wbr></wbr></span><span style="CoLor: #ff0000">name</span><span style="CoLor: #0000ff">="search"</span><span style="CoLor: #ff0000"><wbr>classId</wbr></span><span style="CoLor: #0000ff">="DefaultConfigObject"</span><span style="CoLor: #ff0000"><wbr></wbr></span><span style="CoLor: #0000ff">/></span><span style="CoLor: #000000"><br><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></span><span style="CoLor: #0000ff"><</span><span style="CoLor: #800000">verb<wbr></wbr></span><span style="CoLor: #ff0000">name</span><span style="CoLor: #0000ff">="lock"</span><span style="CoLor: #ff0000"><wbr>classId</wbr></span><span style="CoLor: #0000ff">="DefaultConfigObject"</span><span style="CoLor: #ff0000"><wbr><wbr></wbr></wbr></span><span style="CoLor: #0000ff">/></span><span style="CoLor: #000000"><br><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></span><span style="CoLor: #0000ff"><</span><span style="CoLor: #800000">verb<wbr></wbr></span><span style="CoLor: #ff0000">name</span><span style="CoLor: #0000ff">="unlock"</span><span style="CoLor: #ff0000"><wbr>classId</wbr></span><span style="CoLor: #0000ff">="DefaultConfigObject"</span><span style="CoLor: #ff0000"><wbr><wbr></wbr></wbr></span><span style="CoLor: #0000ff">/></span><span style="CoLor: #000000"><br><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></span><span style="CoLor: #0000ff"><</span><span style="CoLor: #800000">verb<wbr></wbr></span><span style="CoLor: #ff0000">name</span><span style="CoLor: #0000ff">="clear"</span><span style="CoLor: #ff0000"><wbr>classId</wbr></span><span style="CoLor: #0000ff">="DefaultConfigObject"</span><span style="CoLor: #ff0000"><wbr><wbr></wbr></wbr></span><span style="CoLor: #0000ff">/></span><span style="CoLor: #000000"><br><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></span><span style="CoLor: #0000ff"><</span><span style="CoLor: #800000">verb<wbr></wbr></span><span style="CoLor: #ff0000">name</span><span style="CoLor: #0000ff">="reset"</span><span style="CoLor: #ff0000"><wbr>classId</wbr></span><span style="CoLor: #0000ff">="DefaultConfigObject"</span><span style="CoLor: #ff0000"><wbr><wbr></wbr></wbr></span><span style="CoLor: #0000ff">/></span><span style="CoLor: #000000"><br><br></span><span style="CoLor: #008000"><!--</span><span style="CoLor: #008000"><br><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><verb<wbr>name="migrate"<wbr>classId="DefaultConfigObject"<wbr><wbr>/><br></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></span><span style="CoLor: #008000">--></span><span style="CoLor: #000000"><br><wbr><wbr><wbr><wbr></wbr></wbr></wbr></wbr></span><span style="CoLor: #0000ff"></</span><span style="CoLor: #800000">object</span><span style="CoLor: #0000ff">></span> </div> <div><span><a><font color="#8D8C8C">复制代码</font></a></span></div> </div> <p><wbr></wbr></p> <p><wbr>汗,他把这个命令给注释了!。去掉注释,再运行,提示:</wbr></p> <p>"C:\Program Files\IIS Express>appcmd migrate config "WebSite1/wxymap"</p> <div> <div>Successfully migrated section "system.web/httpModules".</div> </div> Successfully migrated section "system.web/httpHandlers"."<wbr><p>再运行,迁移成功! 希望对用得到的人有所帮助</p> </wbr> </div> </wbr></wbr>