Share via


The template deployment is not valid according to the validation procedure.

Question

Friday, June 22, 2018 3:35 PM

Dear Team,

I am getting the below exception while deploying the VMs using Azure SDK (C#).

The template deployment <deploymentname> is not valid according to the validation procedure. The tracking id is <CorrelationId>. This is thrown from Microsoft.Rest.Azure.CloudException.

I can see that whenever my resources are exceeding the core/quota limit, then this exception is thrown. But this exception message is too generic. Why it does not give the proper exception? Screenshot taken from Eventlogs is for your reference.

All replies (8)

Friday, June 22, 2018 6:26 PM

How are you deploying from a template? Using PowerShell or CLI? 


Sunday, June 24, 2018 2:44 PM

Just checking in if you have had a chance to see the previous response. We need the following information to understand/investigate this issue further.


Monday, June 25, 2018 1:47 PM

Hi Micah,

Thanks for your response.

I am not using PowerShell or CLI. I am using C# code to deploy the VMs using Visual Studio 2017.

Regards,

Naveen


Monday, June 25, 2018 3:59 PM

Got it. Thanks for that :) 

What error do you see in Visual Studio when you run out of cores? Generally in PowerShell or CLI you will get a message related to being out of cores. 


Tuesday, June 26, 2018 3:58 PM

Same Error which I have pasted in the initial thread. I am getting this type of exception when I am trying to deploy VMs. I have pasted the exception below. 'vnath480622-073134-DP741' is the DeploymentName.

Exception:
The template deployment 'vnath480622-073134-DP741' is not valid according to the validation procedure. The tracking id is '55b22013-2e29-49af-8fec-f7a8b5d268f9'. See inner errors for details. Please see https://aka.ms/arm-deploy for usage details.

Inner Exception:

Source:
Microsoft.Azure.Management.ResourceManager.Fluent

Stack Trace:   *
*   at lambda_method(Closure , Object , Object[] )

*   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__3(Object instance, Object[] methodParameters)*
*   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)*
End of stack trace from previous location where exception was thrown
*   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()*
*   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)*
*   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()*
End of stack trace from previous location where exception was thrown
*   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()*
*   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)*
*   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()*
End of stack trace from previous location where exception was thrown
*   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()*
*   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)*
*   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()*


Wednesday, June 27, 2018 12:44 AM

Got it. Thanks for that! 

So from your main question, is the ask here why the error message is what it is? I see we only see this issue when you are low on cores so that is the reason for the message. But what is it we are looking to get out of this exactly? 


Wednesday, June 27, 2018 1:35 PM

Thanks for your response.

The ask is, why it is not throwing the exact exception message when I am running out of cores it should have thrown the exception with the straight message. Instead it throws The template deployment <deploymentname> is not valid according to the validation procedure. The tracking id is <CorrelationId>.

What a developer can understand from this? From the application point of view, how I can throw this exception with the proper details..


Wednesday, June 27, 2018 3:43 PM

Got it. Thanks for clarifying. Not sure I can tell you exactly why that is the error message that is given. It is written into the visual studio code but as per who/ why the opted for that error message is not something I can directly answer. 

If you feel improvements can be made to the product then I suggest you take a look at this link: 

https://msdn.microsoft.com/en-us/library/b8akas30.aspx

It has information about how and where to provide feedback for the visual studio team so they can look into it and consider implementing it into the product. 

Specifically it directs you to leave feedback on their user voice page: 

https://visualstudio.uservoice.com/forums/121579-visual-studio-ide