Brian
Brian

Reputation: 1808

Different Azure WebRole Endpoint in Development

We have two Azure web roles. One for an API and one for an authentication server. In production they will both be on separate hosts so they can both be on port 443. However, in development, we would like to be able to run both at the same time on the same machine. Just for development, we'd like the auth server to run on port 8443 and the API server to run on 443. The problem that we're running into is that we don't see a way to have separate endpoint configurations in development and production. The Endpoint properties for the web role don't allow the endpoints to have different configurations.

The only way we've been able to figure out how to get the system running is to have one of the servers run on 8443 for both development and production which seems like a hack and not scalable from the perspective of development a big system that has lots of endpoints.

Does anyone have a good way to run web roles on different ports in the development environment?

Upvotes: 0

Views: 196

Answers (1)

bzlm
bzlm

Reputation: 9727

You can use separate Windows Azure Cloud Service Projects (.ccprojs) to achieve this. You can use one ccproj for the emulated F5 cloud and one ccproj for Windows Azure.

These ccprojs can either both be in the same solution file, or in separate solution files. When cspacking or F5ing, you still have to choose which ccproj to use. For the same solution file approach, just add a new ccproj using the Visual Studio tooling.

I've had issues with multiple ccprojs in the same solution file, where NuGet packages (most notably the Azure Caching suite) assumed there was only one ccproj in the solution and either hence tried to add configuration settings to those role configurations only, or just outright crashed. So if you have strange issues of this kind, I'd go for the separate solution files approach.

Upvotes: 1

Related Questions