VS2013 and Azure - deployment template validation

2019-06-17 05:02发布

I'm trying to deploy my website to azure from visual studio. It's a pretty standard website, nothing tricky to it, and I'm using the "one click" (HA!) method of deployment from Visual Studio 2013 express. However, I don't even get as far as creating the web-app. The "create web-app on microsoft azure" dialog fails when I click create after naming the application, creating a resourcegroup and selecting a dbserver and service plan, with the following message:

Request to https://management.azure.com/subscriptions/8ffb8793-a03d-45d4-88b5-647f5baf0fa0/resourcegroups/raocresourcegroup/deployments/website_deployment?api-version=2014-04-01 PUT failed BadRequest 400 (Bad Request)

Deployment template validation failed: 'The provided value for the template parameter 'sku' at line '16' and column '17' is not valid.'.

My main problem is that I have no idea what visual studio is talking about. I googled "deployment template validation failed" and I couldn't find much about the error. I googled "deployment template" to see what that actually is, and came up with pretty much nothing. I have no Idea what the parameter "sku" might stand for. I certainly have not edited it anywhere. I haven't even ever changed the project properties on this thing.

If somebody could point me in the right direction so I at least have an idea where to start and what to look for, I would much appreciate it.

3条回答
劳资没心,怎么记你
2楼-- · 2019-06-17 05:41

Same happened to me. What I did:

  • Right-click on project and choose Publish
  • On the Profile tab choose Microsoft Azure Web Apps from publish target options
  • Tried to create it ones more with same data as before, but failed ones more - this time with warning popup, that inputs should be lowercase and numbers only
  • For the first shot changed my Database Server name to be like that

... and then it was created successfully. It seems that there should be some input validation there as you typed.

查看更多
成全新的幸福
3楼-- · 2019-06-17 05:54

Since no one replied and google wasn't forthcoming with any more information, I still don't know what deployment templates are exactly or what the parameter "sku" does.

What I DO know now is that the problem can be circumnavigated by creating an empty web-app profile through the azure portal and then deploying to that profile, skipping the profile creation part in visual studio.

查看更多
淡お忘
4楼-- · 2019-06-17 06:08

I had the same problem. It turned out that since I was using VS 2013, I had to update Web Deploy 3.5 to Web Deploy 3.6 in Control Panel/Programs. Worked perfectly after that.

Remember to download Publish Profile and Import the profile when Publishing. Hope that helps!

查看更多
登录 后发表回答