Wednesday, February 26, 2014

Startup page or default page for Azure Web Role


Right now if you have a web role hosted on azure and you want your .aspx page to be displayed when user hits to root url of *.cloudapp.net then you don’t have any choice to do it from Windows Azure Management Portal.

However this setting can be configured from web config file before deployment to Azure. Under <configuration> section add following snippet tag –


<system.webServer>
    <defaultDocument>
      <files>
        <clear/>
        <add value="Login.aspx"/>
      </files>
    </defaultDocument>
  </system.webServer> 

That’s it! You are done. Now when user hits to root url of cloud application, he /she will be redirected to page you have set up.

Hope this helps.

Cheers…
Happy clouding!!!

1 comment: