bri*_*an1 7 asp.net web-config virtual-directory
我已经读过applicationhost.config文件设置默认值,root下面的所有目录都继承这些设置.
我知道可以更改web.config中的defaultdirectory,但我似乎无法对虚拟目录执行相同的操作.
任何指针,帮助表示赞赏.
注意:下面的WEB.CONFIG文件不起作用......只是在那里解释我想要的.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="Off" />
<compilation debug="false" targetFramework="4.0" />
</system.web>
<system.webServer>
<httpErrors errorMode="Detailed" existingResponse="Auto"/>
<asp scriptErrorSentToBrowser="true"/>
<directoryBrowse enabled="false" />
<defaultDocument>
<files>
<clear />
<add value="Default.aspx" />
<add value="default.html" />
</files>
</defaultDocument>
<httpProtocol>
<customHeaders>
<clear />
</customHeaders>
</httpProtocol>
</system.webServer>
<system.applicationHost>
<sites>
<site name="wed" id="1" serverAutoStart="true">
<application path="/alpha-beta">
<virtualDirectory path="/" physicalPath="\url.com\wwwroot\alpha\beta" />
</application>
</site>
<applicationDefaults applicationPool="DefaultAppPool" />
<virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>
</system.applicationHost>
</configuration>
Run Code Online (Sandbox Code Playgroud)