3
votes

I have deployed to Azure Web sites several times from Visual Studio but since some weeks ago I can't deploy anymore. I get this error over and over again

Web deployment task failed. (Error deserializing string. String larger than expected. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FAILED_TO_DESERIALIZE.)

I have no clue how to solve this (Seems impossible to find anything online either). I can deploy via FTP. Any help is appreciated.

EDIT: I'm using Visual Studio 2015, update 1.

EDIT 2: I created a new deployment slot and deployed to that one. After that I did a VIP swap and now I can deploy to both instances. I still have no clue why it didn't work before.

2
Are your Azure web app built with ASP.NET 5 or below?juvchan
One interesting test: if you deploy to a test Azure Web App instead of your real one, does the same issue occur? That may help isolate the nature of the issue.David Ebbo
@juvchan it's built with .net target framework 4.5.Andreas
@DavidEbbo If I create a new deplopyment slot and deployt it to the new empty slot it works. Also, if I deploy to my local file system it works.Andreas
It's puzzling. It means that the issue is more with the state of the Web App than with what you're deploying. I see one instance of this issue here, but there was no follow up.David Ebbo

2 Answers

0
votes

I had this exact same error when deploying a website to the Free Azure App Service Tier (F1). We're using .NET Framework 4.6 using Visual Studio 2015 Update 3.

To work around the error I scaled up the App Service to Production (S1) then the web deployment was successful. I could then scale it back to F1.

0
votes

When you publish to azure web server, I think the number of files you can publish at one time is limited.

Try to publish lower than 1024 files at a time. (this is not exact number though..)

** You can publish by folders or even by files.

This tip is for free subscription plan, I am not sure about other plans.