Rory Primrose

Learn from my mistakes, you don't have time to make them yourself

View project on GitHub

Workaround for Azure SDK Invalid access to memory location error

There is an issue with the Azure 1.6 SDK that I often hit when I run a cloud project. I get around 3-5 debug sessions with my cloud project before Visual Studio starts throwing an Invalid access to memory location error.image

This issue seems like it is hitting many other people as well. This is a significant pain point for working with Azure projects and there is currently no suitable workaround or fix that I can find. Sometimes shutting down the emulator and trying again works. Most often however, the IDE needs to be recycled. Having to do this each fifth F5 is a productivity killer.

Read More

Spinning up IISExpress for integration testing

The system I am currently working uses the development fabric in the Azure SDK for working with Azure web roles and worker roles. I am also using a local WIF STS site to simulate Azure ACS. This allows me to integrate claims based security into the system without having to actually start using an Azure subscription.

The local STS is running on IISExpress. Like the previous post about running the Azure emulator for integration testing, the STS also needs to be spun up to run the system. The following class provides the wrapper logic for spinning up IISExpress.

Read More

Boosting integration testing with Azure development fabric

I posted previously about manually spinning up Azure storage emulator in the development fabric so that it can be used with integration tests. Ever since then I have been using a vastly updated version of the code I previously published.

This updated one might be helpful for others to leverage as well. This version allows for starting and stopping both the storage emulator and the compute emulator. It makes its best attempt at automatically finding the Azure project service directory and the service configuration for the current build configuration. If this does not work for your scenario, then you can also manually provide this information.

Read More

SSAS fails to process TFS cube in Tfs_Analysis

One of the TFS instances that I am responsible for started failing to process its Analysis Services cube a few days ago. The nature of the environment is that I can only do a reboot after hours. I also wanted to try to find out what was wrong before resorting to a reboot so that we could try to fix the problem rather than just doing a band-aid.

The topology of the TFS deployment is the following:

  • TFS App Tier – also hosts SSRS
  • TFS Data Tier – SQL Server, SSIS and SSAS
  • TFS SharePoint Tier
  • TFS Controllers
  • TFS Build Environment
  • CI Host Platform

[Full Analysis Database Sync]: [Full Analysis Database Sync]:

Read More

Quick Poll–UX of UI navigation for list with a single item

I’m after some feedback from the community regarding the UX of UI navigation when dealing with a list of items where there is only one item in the list.

I have a scenario in a UI where there is a list of subscriptions for a user account. Most of the time (~>90%) there will only be one subscription. There are two options for handling this.

  1. Always display the list when the user navigates to the list UI and force the user to manually select the only item available
  2. Automatically redirect the user to the item display screen if there is only one item

Option #1 is consistent but includes an unnecessary navigation (+ human intervention). Option #2 is streamlined, but provides an inconsistent UX when the list changes to have a second item.

I have leant towards #2 because of the expected metrics of my specific scenario in addition to it being more streamlined. The point of inconsistency is a thorn in my side however.

Thoughts? Votes? Any UX experts want to shed some opinions?

Read More

Finding solutions not covered by automated builds

I am slowing building a set of automated tasks in my current role as a TFS administrator to verify the state of TFS. My latest task looks for solutions that are not covered by automated builds.

It’s a fairly straight forward task that enumerates solution files and matches them to build definitions across all projects and collections in a TFS instance.

Read More

Refreshing an expired STSTestCert WIF certificate

I have been using WIF for the last couple of years on a few of my projects and the STSTestCert gets a bit of a workout on my development machines. This certificate is only valid for 12 months. All the applications that use this test certificate will fail to execute authentication requests once this certificate has expired.

Here is the easiest way to renew the certificate.

  1. Open up MMC and attach the Certificate Manager plugin for the local machine.
  2. Navigate to Certificates (Local Computer) -> Personal -> Certificates.
  3. Select and delete the expired STSTestCert certificate.
  4. Open VS with elevated rights
  5. Add a new solution
  6. Add a new STS project to that solution using the Tools -> Add STS Reference… menu item
  7. Continue through the wizard
  8. Refresh the MMC console and you should now have a fresh STSTestCert

image

Read More

How much do I love the yield statement?

Quite simply, a lot. The yield statement seems to be such a simple part of C# yet it can provide such amazing power (being delayed enumeration). Outside of that power however, it can provide beautiful simplicity.

Take the following abstract class for example:

Read More

Configuring a TFS 2010 build agent to compile SharePoint 2010 projects

I’ve been doing several TFS consulting gigs over the last couple of years. The one thing that keeps popping up is the requirement to build several types of platforms using TeamBuild/TFSBuild. My preference is to isolate build agents and their customisations. This means for example that I have a mix of build agents like the following:

  • Standard (full VS install + any common additions - WiX for example)
  • SharePoint
  • BizTalk

Tagging the build agents and configuring the build definitions for those tags then allows the build to be directed to the correct build agent.

Read More