I have an app service (API, actually) published in Azure. Lately I’ve run into some strange problems where the service apparently just crashes with no exception handling. I have logging all over the place, and it just stops in its tracks when the code makes a specific service call, with no evidence of what’s going on. All of my unit testing and automated integration tests work fine. So, I’m breaking down and learning remote debugging of a Microsoft Azure process.
The obvious place to start is the Azure tutorial, here:
I followed the instructions, but had to make a few adjustments.
- Remote debugging reportedly blocks the rest of the website, so you definitely don’t want to do it in production.
- I use deployment slots, and have on called “dev” just for the purpose of development testing (and now remote debugging).
- You have to enable remote debugging in the deployment slot, not the main website.
- When you attach to the process, you have to use the right userid in the form of <website_uid>__<slotname>. That’s with two underscores. E.g. “MySitePublishingId__dev”. I found this specific ID in the publishing profile that you can download for each site and slot.
Through all of this, I’ve come to the conclusion that the thread is probably not crashing, but rather hanging due to async call returns (deadlock). But however I work that out will be another post.
I’m playing around with XML transformations today and needed a refresher. This is a pretty good explanation straight from the horse’s mouth.
I’m deploying to an Azure website, in which case there are ways to keep connection strings and app settings unique to each slot of your website. https://azure.microsoft.com/en-us/blog/windows-azure-web-sites-how-application-strings-and-connection-strings-work/
However, the setting I need to tweak for production isn’t an “app setting”, but rather a servicemodel client endpoint, which apparently has to be done the hard way. 😦
HTTP Tests not running on my virtual machine. Access denied was returned from the Owin Serverfactory. The answer is to run this from the admin CMD console (not PowerShell).
netsh http> add urlacl url=http://locahost:<port#>/ user=Everyone
Several times now I’ve encountered issues where Xamarin doesn’t let me deploy an app under development to an iOS device. In some cases, I’ve found the answer here, but I’m going to lay out the full solution for all cases.
- Register your unique device ID (UDID) at Apple Developer Device List. You won’t have to start here every time. In fact, if you’ve been developing/deploying to your device for a while and Xamarin suddenly stops deploying to the device, this is not the problem. But if you’ve never used the device for development before, this is where you have to start. You can search for instructions on getting your UDID, but it seems the easiest way is to connect your device and view it in iTunes.
- In Xamarin Studio v5, go to the context menu for your iOS project and select: Options > iOS Bundle Signing. You may have to twiddle with the Signing Identity and the Provisioning Profile. In my case, they were both set to Automatic after a XS update, but to get it to work I had to change the Provisioning Profile to iOS Team Provisioning Profile.