http://www.tzwhx.com/newOperate/html/7/71/711/22426.html
需要注意的是,默认的配置没有绑定到任意IP地址和虚拟目录,经过测试,以下配置可以使用
<sites>
<site name="WebSite1" id="1" serverAutoStart="true">
<application path="/" applicationPool="Clr2ClassicAppPool">
<virtualDirectory path="/" physicalPath="你的网站物理目录\" />
</application>
<application path="/xtcrm" applicationPool="Clr2ClassicAppPool">
<virtualDirectory path="/" physicalPath="你的应用程序物理目录" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":80:" />
</bindings>
</site>
<siteDefaults>
<logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
<traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
</siteDefaults>
<applicationDefaults applicationPool="Clr4IntegratedAppPool" />
<virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>
<site name="WebSite1" id="1" serverAutoStart="true">
<application path="/" applicationPool="Clr2ClassicAppPool">
<virtualDirectory path="/" physicalPath="你的网站物理目录\" />
</application>
<application path="/xtcrm" applicationPool="Clr2ClassicAppPool">
<virtualDirectory path="/" physicalPath="你的应用程序物理目录" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":80:" />
</bindings>
</site>
<siteDefaults>
<logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
<traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
</siteDefaults>
<applicationDefaults applicationPool="Clr4IntegratedAppPool" />
<virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>
然后将applicationhost.config 这个文件复制到你指定的目录
最后运行“iisexpress /config:你的applicationhost.config物理路径"