Configure the Virtual Directory Location
Updated: April 13, 2011
You can configure web sites and web applications that use virtual directories that are mapped to physical directories. For additional information on how IIS 7.0 manages virtual directories, see Managing Virtual Directories in IIS 7.0.
|The VirtualDirectory element is only available by using the Windows Azure SDK version 1.3 or above.|
Open the ServiceDefinition.csdef file for the web application.
Locate the Sites element, and then locate the specific site that will host the virtual directory.
Add the following VirtualDirctory element. The name attribute value is the alias that will be used to access the directory in a URL. The physicalDirectory attribute value contains the path to the directory on your virtual machine.
<WebRole name="SampleWebApp"> <Sites> <Site name="SampleSite" physicalDirectory="..\SampleWebApp"> </VirtualApplication> <VirtualDirectory name="Scripts" physicalDirectory="..\SampleWebApp\Scripts" /> <VirtualDirectory name="Styles" physicalDirectory="..\SampleWebApp\Styles" /> </Bindings> </Site> </Sites> </WebRole>