1
votes

We have two web applications in one Cloud Service, since we want to use the same endpoint for both, we prefer to host these two web applications in one Web Role. This blog figured out it's possible, as long as we add a new site node under Sites.

Our requirement is that we host Web2 in such url: http://appname.cloudapp.net/web2, so if customer click http://appname.cloudapp.net, it will show Web1, and for http://appname.cloudapp.net/web2 it will show web2, use something like subpath to distinguish the two web applciations.

Is it possible?

1

1 Answers

2
votes

You just need to use a combination of Sites and Virtual applications to achieve that goal.

In your csdef define it as follows:

 <Sites>
     <Site name="Web1" physicalDirectory="Web1">
         <VirtualApplication name="Web2" physicalDirectory="Web2"></VirtualApplication>
    </Site>
 </Sites>

That will result in Web1 being the root application at http://appname.cloudapp.net and Web2 being a virtual directory beneath it.