How do I add a website to a virtual network in Windows Azure?

2.9k Views Asked by At

Scenario:

I have a website on Windows Azure. That website needs to connect to a (new) Azure VM.

I have done the following:

  • Created new Virtual Network on Azure
  • Added the VM to the Virtual Network, and it does get an IP in the virtual network.
  • I have configured the appropiate Endpoint for the VM (Public/Private port).

Now, how do I "connect" the Azure website to the same virtual network, such that my .NET code in the website can create a TCP connection to the VM on it's IP on the Virtual Network ?

3

There are 3 best solutions below

0
Koen Zomers On BEST ANSWER

This is now possible. Be sure to use the NEW Azure Portal. For details, check out: http://azure.microsoft.com/blog/2014/09/15/azure-websites-virtual-network-integration/

4
astaykov On

Currently you cannot connect/add Azure Web Site to a Virtual Network. You can only add VMs and Cloud Services to a Virtual Network. However this is a demanded feature and I believe we will see it in the future releases of the Web Sites service (my speculation).

0
user2864744 On

The key here is to create the Virtual Network before the Virtual Machine and then place the VM in the VN during it's creation. The article here gives instructions moving a VM into a VN.

http://blogs.msdn.com/b/walterm/archive/2013/05/29/moving-a-virtual-machine-from-one-virtual-network-to-another.aspx