none
How to Stop opening up multiple instances of web browser when a web role has multiple web sites ?

    Question

  • I have an Azure solution which has a website under a webrole. the webrole is an empty webproject. when i run the project i see two instances of web browsers opening up. i want only the website to run under that webrole and somehow prevent opening up of the empty web project in the browser. Is there a way we can acheive this ? i have also configured the empty web app to not open a page and wait for a request from external application.

    the service definition file has two <site> defined under <sites> section under the <webrole> node.

    i tried commenting out the following listed below under the <sites> but in vain.

    <Site name="Web">
    <Bindings >
    <Binding name="Endpoint1" endpointName="Endpoint1" />
    </Bindings >
    </Site > 

    here's my full ServiceDefinition.csdef. how can i make changes so that it only opens up the website in the browser and not the empty webapp ?? Currently i see two instances opening up. one for website and the second for empty web app which is in fact a webrole in the solution.

    <?xml version="1.0" encoding="utf-8" ?>
    <ServiceDefinition name="WindowsAzureMultipleWebSite" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" >
    <WebRole name="WebAppMaster">
    <Sites >
    <Site name="Web" >
    <Bindings>
    <Binding name="Endpoint1" endpointName="Endpoint1" />
    </Bindings >
    </Site >
    <Site name="Second" physicalDirectory="../WebSite" >
    <Bindings >
    <Binding name="Endpoint2" endpointName="Endpoint2" />
    </Bindings >
    </Site >
    </Sites >
    <Endpoints >
    <InputEndpoint name="Endpoint1" protocol="http" port="80" />
    <InputEndpoint name="Endpoint2" protocol="http" port="81" />
    </Endpoints >
    <Imports >
    <Import moduleName="Diagnostics" />
    </Imports >
    </WebRole >
    </ServiceDefinition>

    Friday, August 12, 2011 4:56 AM

Answers

  • found out a solution myself. Actually deploying this package to windows azure portal will result in desired functionality.

    the hosted service will have two input endpoints. any website under the webrole can be accessed by specifying the root url and port number

    like [ yourapp.cloudapp.net:80 and your yourapp.cloudapp.net:81 ]

    this means it only opens up the desired website irrespective of the number of websites under the Master Web role.

    Multiple web browsers opens only in dev environment for an azure webrole having multiple websites.


    amyth
    • Marked as answer by Azure Ace Friday, August 12, 2011 6:29 AM
    Friday, August 12, 2011 6:29 AM