In Windows Azure SDK 1.3 you have ability to setup multiple sites
within your full IIS role as well as Virtual directories.
When you are developing your application and needed to setup
Virtual Directories, here I will explain how you can configure VirtualDirectory
for specified Site in ServiceDefinition.csdef file.
So if you have your VS2010 Solution is located at:
And your Cloud Project is:
In that case the Service Definition (CSDEF) should be constructed
for Virtual Directories as below:
<ServiceDefinition name="Service_Name" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<WebRole name=" Services.WebRole_Name">
<Site name="Web" physicalDirectory="..\..\1.0.0\PHYSICAL_DIRECTORY">
<VirtualDirectory name="VersionDir" physicalDirectory="..\..\1.0.0">
<VirtualApplication name="AppDir" physicalDirectory="." />
<Binding name="Endpoint1" endpointName="Endpoint1" />
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
<Import moduleName="Diagnostics" />
You need to control TWO important things:
1. Please be sure to keep the total path size under 260
characters otherwise you will get another error.
2. The directory name must be
under 248 characters which could also cause another error.