IIS Express添加虚拟目录或者应用程序
IIS Express添加虚拟目录或者应用程序:
https://www.cnblogs.com/mirrortom/p/6767498.html
1.右击IIS E 的图标,点击显示所有应用程序

2.选择那个要加虚拟目录的测试网站,点击配置

3.会在VS中打开这个文件applicationhost.config
找到site节,这个节下有很多网站,根据名字找到要配置的那个,增加下图中红框所示的节,修改剪头所指的关键属性 即虚拟目录的名字,虚拟目录的物理地址

4.完成,打开路径 localhost:123/cdn/xxx.img 测试效果
https://qastack.cn/programming/8735713/creating-virtual-directories-in-iis-express
IIS express配置由applicationhost.config管理。
你可以在找到它
Users \ <用户名> \ Documents \ IISExpress \ config文件夹。
在内部可以找到“站点”部分,其中包含每个IIS Express配置站点的一部分。
添加(或修改)网站部分,如下所示:
<site name="website1" id="20">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="c:\temp\website1" />
</application>
<application path="/cms" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="d:\temp\website1" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:1132:localhost" />
</bindings>
</site>
<site name="website1" id="20">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="c:\temp\website1" />
</application>
<application path="/cms" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="d:\temp\website1" />
<virtualDirectory path="/cms_plug001" physicalPath="d:\temp\website1" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:1132:localhost" />
</bindings>
</site>
浙公网安备 33010602011771号