Here’s an interesting fail. I’m at the Windows Azure Developer Camp practicing some Git Deploy (total win!), and I hit a very interesting snag. I’m deploying a legacy .net 3.5 app, and “git push azure master” failed with an http 500. No other message. Enter head-scratching mode. Is it that it’s using a Windows Azure SQL Database? Did I typo the connection string? Did I put an unusual character in the site name? Did I typo the deployment credentials? Is my machine controlled by aliens?
A few rounds of thrashing ensued where I reset deployment credentials, validated the git remote url, typed credentials painstakingly carefully, and still the same result: “http 500.” Next round: I deleted and recreated the Azure Website (simpler name), switched to .net 3.5 in the Azure Portal, ran git deploy, and fail again. Crap. Well, rule out typo or bad character.
On a whim I switched it to .net 4.5 in the portal, and git deploy succeeded. (Of course my site is now toast because it isn’t a .net 4.x site, but it’s now deployed. Switch back to .net 3.5 and the site springs to life though.) Ok, this is curious. I flipped another dozen switches before I found the solution: git deploy fails when the site is set to 3.5 in the Azure Portal. This is quite repeatable. Changing nothing else, I set to 4.5, git push azure master succeeds. I set it to 3.5, git push azure master fails with 500.
I know nothing of the internals here, but wondering aloud with Michael Palermo, I’m guessing perhaps Kudu‘s git mechanism links against libgit2’s .net bindings, and that exe is a 4.x app. Perhaps when IIS is set to 3.5, the deployment also runs in 2.x/3.x mode, and this 4.x deployment app fails.
Ultimately, I got past the problem, and were I to make a serious move here, I’d just recompile in .net 4.5.1 and be done. And more than likely if I’ve embraced the cloud to the point that I’d git deploy into production, I’ve also embraced .net 4.5. But for that interesting edge case where I am git deploying .net 3.5, should it fail in such an obscure and undiscoverable way? That’s where the real head-scratching begins. :D