Declaring LightSwitch Azure Tools Certificate Bankruptcy
We have seen some forum posts very recently where folks aren’t able to publish to Azure because of an error like this:
In response to this I have been messing around with things this afternoon and I think I have come up with a set of steps to get users out of this mess. The way that I can repro getting into this situation is if I have published my project successfully to Azure (at some point) and then I remove the Azure Management Certificate from my Personal Certificate Store:
And have removed the subscription from the list of subscriptions that VS is keeping track of:
In this case, if I launch the Publish Wizard we will see that there is no Subscription entry that matches what we are tracking in the lsxproj and lsxproj.user and we create one, this one still won’t work, however, because we still don’t have the backing certificate (here’s what this entry looks like)
Now there are likely other ways to get into the situation, but this is how I got into it. Here is how I can get out:
1. In "Server Explorer", right-click on "Windows Azure" and select Manage Subscriptions
2. In the "Manage Windows Azure Subscriptions" window, use the Delete button to remove all stored subscriptions. Then Close the window.
3. In the Server Explorer, Right-click on "Windows Azure" and this time select Import Subscriptions
4. First, Download subscription file, (you may need to enter your Azure credentials at this time). Browseto the location that you saved the file, then hit Import
Now attempt to launch the LightSwitch publish wizard again. What should have happened is that a new Subscription Entry was created (for VS) and the certificate was re-imported into the Personal Certificate Store.
This worked for me, I hope it works for you as well.
Comments
Anonymous
September 03, 2014
Hi Dave, Just wanted to say a big thank you for this post. I've been battling publishing issues for the past 5 days and went through many posts and tried many of the recommended solutions with no luck. Until I tried your proposed solution. I'm super happy that I can once again deploy my app, but I wish I would have found your blog 5 days ago...:)Anonymous
June 01, 2015
Thanks for this post Dave. I ended up wiping my development laptop and rebuilding it and the publish worked once - then broke again! Until I found your post that is. Just wanted to point out that I'm running VS2013.4 Community - I didn't receive no error. Every time I went to publish VS would just hang and I could come back maybe 2 hours later and it was still hangin'! I used both this post (big thanks!) and your other one for the LightSwitch Publishing Wizard Bankruptcy to solve my issues! Love your work!