2

I have a ASP.NET website in windows azure that uses a web reference. I use azure as my QA environment and on QA, the site should connect to the QA web reference. On my previous QA environment, I used hosts file entry to point the web reference domain name to the QA IP address. but after migrating to windows azure, I don't know how to point the web reference to the QA IP address. is there any other way to do it?

Arbi
  • 53
  • 4
  • You might need to migrate web reference project to Azure too! and the get exact website URL for web ref project and use that in website. – Arindam Nayak Oct 17 '14 at 18:43

1 Answers1

0

I do not believe you can affect hosts in Azure.

Instead, I suggest using SlowCheetah. It is an open source project that will transform your configuration file (or any XML file) based on the build you are targeting. I use it to change the connection string in web.config for QA and PROD builds.

This package enables you to transform your app.config or any other XML file based on the build configuration. It also adds additional tooling to help you create XML transforms.

https://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5

You can set your web reference to be dynamic, so that the specifics are loaded from your web.config. See

https://stackoverflow.com/a/2335499/141172

Community
  • 1
  • 1
Eric J.
  • 139,555
  • 58
  • 313
  • 529