4

I had gone through multiple articles and SO Questions like - this, this, and this (and many others)

However none of them serves my issue. I would like to deploy two web roles in one cloud service. I tried deploying the same but found one is running whereas other web role throws – Internet Explorer cannot display the webpage / connection timeout in firefox.

Here is what I tried so far: -

I have two web roles (App and Service), when I deployed either App or Service to a cloudservice for e.g. http://xxxx.cloudapp.net, it works fine.

But when I tried deploying both App on port 8080 & Service on port 80 in http://xxxx.cloudapp.net, and tried browsing - http://xxxx.cloudapp.net, it displays Service page.

Whereas, while browsing App using - http://xxxx.cloudapp.net:8080, it throws error – Internet Explorer cannot display the webpage / connection timeout in firefox.

But my app works fine when just App is deployed on port 80.

Here is the ServiceDefinition file : -

<ServiceDefinition name="AppServiceAzure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2013-03.2.0">
  <WebRole name="MyService" vmsize="Small">
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="Endpoint1" />
        </Bindings>
      </Site>
    </Sites>
    <Endpoints>
      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
    </Endpoints>
    <Imports>
      <Import moduleName="Diagnostics" />
    </Imports>
    <Certificates>
      <Certificate name="mycert" storeLocation="LocalMachine" storeName="My" />
    </Certificates>
  </WebRole>

  <WebRole name="MyApp" vmsize="Small">
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="Endpoint1" />
        </Bindings>
      </Site>
    </Sites>
    <Endpoints>
      <InputEndpoint name="Endpoint1" protocol="http" port="8080" />
    </Endpoints>
    <Imports>
      <Import moduleName="Diagnostics" />
    </Imports>
    <Certificates>
      <Certificate name="mycert" storeLocation="LocalMachine" storeName="My" />
    </Certificates>
  </WebRole>
</ServiceDefinition>

What I am missing here?

Community
  • 1
  • 1
Anil Purswani
  • 1,857
  • 6
  • 35
  • 63
  • I just tested this and it worked. I created a cloud project with two web roles, each with a separate web project. One responded in port 80, the other in 8080. Make sure you have two endpoints open in your cloud service. Go to the managament portal, cloud service, dashboard, copy the INPUT ENDPOINTS section and update your question with it (hiding the IP address if you want). Let's see how the ports are mapped to the roles. – Fernando Correia Jul 10 '13 at 18:50
  • I have same problem. Here is Input Endpoints: Role1 : IP:80, Role1 : IP:443, Role2 : IP:8080 <-- does not work, Role2 : IP:3389 – daliusd Aug 07 '14 at 15:24

1 Answers1

0

Each Windows Azure Compute instance represents a virtual server of either of following role.

Windows Azure Compute instance
|
|_______[front-end] web server (Web role)
        |
        |
        |_____Site1
        |
        |
        |_____Site2
        |
        |
        |_____Site3 etc.

or

|
|
|
|_______back-end/.NET] application server (Worker role)


or

|
|
|
|_______VM

I suggest two approaches: 1) create Multiple sites in one role.(you will get different endpoints) 2) Or deploy one webrole to staging and other role to production. (again you will get different endpoints)

tetris
  • 121
  • 1
  • 3
  • 1
    Not sure about the 2nd approach here as you lose the ability to actually use staging/production for their intended purpose. – Fishcake Jul 10 '13 at 09:30