Saturday 18 May 2013

Running Multiple Web Application in Different Ports in Single Web Role

We can run multiple web applications in a single web role.
Select the web role in where you want to add the new web application in different port.
Add the new end point with the port 9000.
Now open the csdef file.
Under sites section of the web role add the below configuration.

<Site name="WebApp2" physicalDirectory="path to the web application">
<Bindings>
     <Binding name="Endpoint2" endpointName="Endpoint2"/>
</Bindings>
</Site>

If we add the project in solution we can add the relative path also. For example, if your ServiceConfiguration.csdef file is located at C:\projects\CloudProject\ServiceConfiguration.csdef and the folder containing your new web site is located in C:\projects\NewWebSite then the relative path in the physicalDirectory attribute would be "..\NewWebSite".

No comments:

Post a Comment