Domain name or required name for azure calculation emulator

I need to run a web role in the azure emulator under the domain name, not the localhost IP address (127.0.0.1). I can configure a regular web application to run the project on local IIS, so I can use the actual domain name, not the IP address of the development server ...

My application is very specific for URLs because I use subdomains to define states (USA). For example, I need an azure emulator to use something like:   http://wa.myapp.net , but not http://127.0.0.1 , which makes no sense to me.

I have many functions that relay on subdomains in my url. With a regular web application, I can configure it to work in IIS and set the URL in my project (and bindings in IIS), but I see no way how I can do this in the azure emulator.

Now I have a job. I just set up local IIS to point to the application folder, I can run my application and then just attach my visual studio to the iis process. But in this case, some functions do not work, because the azure role does not work ... therefore it does not completely solve the problem ...

Please advice.

Thank!

+5
source share
3 answers

The MSDN article, Configuring the Web Role for Multiple Websites, explains how to do this.

hostHeader, ServiceDefinition.csdef.

:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="MyService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2013-03.2.0">
    [...]
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="WebSvc" />
          <Binding name="Endpoint1" endpointName="WebSvc" hostHeader="my.custom.domain.com" />
        </Bindings>
      </Site>
    </Sites>
    [...]
  </WebRole>
</ServiceDefinition>

C:\Windows\System32\drivers\etc\hosts URL-.

+2

All Articles