0

I am trying to add virtual directory in WebRole1 of my could service using following directive in csdf file...

<Site name="Web">
    <VirtualDirectory name="aspnet_client" physicalDirectory="..\..\..\crazureresource\aspnet_client" />
      <VirtualDirectory name="Downloads" physicalDirectory="..\..\..\crazureresource\Downloads" />        
    <Bindings>
      <Binding name="Endpoint1" endpointName="Endpoint1" />
    </Bindings>
  </Site>

The development machine directory structure is...

..\CR1\CR1\ProjectFiles
..\CR1\crazureresource\aspnet_client
..\CR1\crazureresource\Downloads

The azure webrole1 directory structure is...

siteroot\0\website-deployed-files
siteroot\crazureresource\aspnet_client
siteroot\crazureresource\Downloads

The package gets published successfully; instance is also updated but WebRole's status is either 'Busy' or 'Restarting'. The website is not deployed on the webrole. If I shorten the path of virtual directory to

> ..\..\..\aspnet_clients and ..\..\..\Downloads

It works (the deployment); but the contents are modified on azure cloud service. In place of these physical folders a new folder by the name of 1 and 2 are created. Inside these two replacement folders, config files are placed by system - the original files are replaced. While at the same time in IIS, a valid link shows for virtual directory.

I am not able to access the resources from virtual directory due to this!

user3104116
  • 153
  • 1
  • 11

1 Answers1

0

For Azure this is the valid directory structure

siteroot\0\website-deployed-files
siteroot\1\                         ----name it as aspnet_client
siteroot\2\                         ----name it as Downloads

and the contents will be availble like below urls

www.exapmple.com   --- default (website-deployed-files)
www.exapmple.com/aspnet_client    --contents of (aspnet_client) 
www.exapmple.com/Downloads        --contents of Downloads

you can update you local directroy structure to match.

for the path in csdef file

physicalDirectory="..\..\..\crazureresource\Downloads"

This is the path from /bin directory of Azure project to the Other projects Downloads.csproj directory. Refer this for updating the Path properly in your csdef file

Hope this helps.

Community
  • 1
  • 1
sudhansu63
  • 6,025
  • 4
  • 39
  • 52
  • Unfortunately the result is same. The two virtual directories I am trying to add is not a separate project rather simple directory. – user3104116 May 28 '15 at 10:29