Quantcast
Channel: Azure Networking (DNS, Traffic Manager, VPN, VNET) forum
Viewing all articles
Browse latest Browse all 6513

Failed to create virtual network via Azure API

$
0
0

Hi.

I'm trying to create new virtual network with no success.

I know i'm using the write credentials such as PUT method and text/plain contenttype (since i read about people who missedout about that).

This is the XML i'm sending (with or without the first line its the same result):

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
<NetworkConfiguration xmlns="http://schemas.microsoft.com/ServiceHosting/2011/07/NetworkConfiguration">
<VirtualNetworkConfiguration>
<VirtualNetworkSites>
<VirtualNetworkSite name="VNet2" AffinityGroup="AffNet">
<Subnets>
<Subnet name="Subnet-1">
<AddressPrefix>192.168.0.0/23</AddressPrefix> 
</Subnet>
</Subnets>
<AddressSpace>
<AddressPrefix>192.168.0.0/23</AddressPrefix> 
</AddressSpace>
</VirtualNetworkSite>
</VirtualNetworkSites>
</VirtualNetworkConfiguration>
</NetworkConfiguration>

and this is the result i'm getting

<Operation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ID>058ec053-92cb-4d83-84d8-b6ac826eeadd</ID> 
<Status>Failed</Status> 
<HttpStatusCode>400</HttpStatusCode> 
<Error>
<Code>BadRequest</Code> 
<Message>Cannot delete or modify virtual network while in use 'VNet1'.</Message> 
</Error>
</Operation>

What seems to be the problem it always think its an edit request although i'm trying to create a new VN and i'm now using the first VN at all.

Thanks.


Viewing all articles
Browse latest Browse all 6513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>