Category Archives: C#

SQL Server Notifications – Polling and ServiceBroker

Introduction As part of the CQRS in Azure MSDN blog series, two forms of notifications were used to notify the application tier of changes to the underlying data model.  For the SQL Azure, a polling mechanism was used and push … Continue reading

Posted in Azure, Azure SQL, C#, Entity Framework | Leave a comment

Faking out Azure – Unit Testing with Microsoft Fakes

Overview Microsoft Fakes provides an excellent framework for code isolation within Unit Tests and is only available for Visual Studio Enterprise subscriptions. Fakes does provide advantages over other frameworks (re., Moq and Rhino Mocks) as it allows for full code isolation and not … Continue reading

Posted in Azure, AzureStorage, C#, Microsoft Fakes, Unit Testing | Leave a comment

Azure Service Bus Queue – Sessions

In scenarios where there are multiple Azure Service Bus clients and you want to route particular messages to particular consumers, sessions are an ideal feature of the Azure Service Bus Queue. This post builds upon the sample project available on … Continue reading

Posted in Azure, C#, Service Bus | Tagged , , , | Leave a comment

Managing Multiple Azure Environments with Visual Studio Online Builds

Carrying on from the Multiple Azure Cloud Environments post, I now want to manage the progression of my solution through the development, staging, and production environment.  Staging in the context indicates an environment and not the staging deployment of a … Continue reading

Posted in Azure, C#, Deployment | Leave a comment

EF Database Migrations–No Connection String

Sometimes things don’t work the way you would expect them to or how they worked in the past.  Entity Framework is one of those things that frustrates me when it goes wrong… I had created a simple database migration in … Continue reading

Posted in C#, Entity Framework | Leave a comment

MVC 4 ApiController Session access

Nothing is accidental when it comes to the behavior of Microsoft technology. It was a conscious decision to not provide access to session state from the ApiController in the same manner as the Controller class. I assume this was an … Continue reading

Posted in ASP.Net, C#, MVC | 4 Comments

MVC–Displaying Content from Ajax calls

This article illustrates two approaches to retrieving content from a service using an Ajax query in the MVC framework.  The first calls a method on a controller to paint a partial view.  The second retrieves html markup from a Web … Continue reading

Posted in ASP.Net, C#, HTML, JavaScript, JQuery, MVC, Uncategorized | Tagged , | Leave a comment

The remote server returned an error: (407) Proxy Authentication Required.

Just a quick note… Several C# components support pulling from http endpoints directly. For example, the XDocument class in System.XML.Linq supports the Load method which takes a URL. If this throws a “The remote server returned an error: (407) Proxy … Continue reading

Posted in C#, Uncategorized | Tagged , | 5 Comments

Azure Table Storage – DataServiceQueryException when using Count()

I have been expanding the Azure Storage Sample project. I came across an interesting limitation with the OData query projection currently supported by the Azure Storage Client. My desire was to have a rowkey that increments per partionkey entry. The … Continue reading

Posted in Azure, AzureStorage, C# | Tagged , , | Leave a comment

Unit Test WCF Clients

In general, I use SoapUI for mocking services. For rapid development this works well, but sometimes it is useful to mock services within your unit tests. The advantages here would include being able to automate the tests and to eliminate … Continue reading

Posted in C#, SoapUI, WCF | Tagged , , , , | Leave a comment