How can I setup a development environment to use subdomains in the Azure emulator like on localhost(IIS) using hosts file?

StackOverflow https://stackoverflow.com/questions/10140251

  •  31-05-2021
  •  | 
  •  

質問

I have this working in an MVC project on IIS by adjusting the hosts file.

When running an Azure project, I can see some ports getting remapped, not sure what thats doing or how I can set up subdomains, is it also done in the hosts file?

役に立ちましたか?

解決

Working with subdomains is possible in Windows Azure. If you need to map these subdomains to different web applications, you'll need to map these in your service configuration (hostHeader attribute):

<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="app.litware.com" />

When developing locally, you can do this using host headers like you described. If you want to deploy to production, you'll need to configure a CNAME on your domain.

Resources

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top