.NET

Solution to Error 175 The specified store provider cannot be found in the configuration or is not valid

Posted by stevenmarkford on April 9, 2011 at 12:03 am

Problem: When building a .NET solution that uses the Entity Framework (EF) the following error message is displayed: “Error 175: The specified store provider cannot be found in the configuration, or is not valid.” and the build fails. Cause: The assembly of the provider being used by the Entity Framework cannot be found, that is, [...]

The Facebook API in a Windows Forms Application

Posted by stevenmarkford on November 12, 2010 at 6:42 am

The Facebook Graph API is quite easy to use and not that hard to integrate into a .Net Forms application (the implementation would differ slightly between programming languages but the concepts are the same) Step 1: Authentication For your forms application to request Facebook-user specific information (e.g. Friends, pictures etc). You need to “Login” to [...]

Unable to Evaluate Expression Because Native Frame is on Top of the Call Stack in ASP.NET

Posted by stevenmarkford on October 20, 2010 at 12:59 pm

Problem: When calling a  Response.Redirect in ASP.NET a ThreadAbortException occurs with the following message “Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack”. Cause: The line of code that follows Response.End is not executed. For a full description see (http://support.microsoft.com/kb/312629/EN-US/). Solution: Call response redirect [...]

Unit Testing Private or Internal Methods In a Different Assembly

Posted by stevenmarkford on October 19, 2010 at 1:07 pm

When you have a separate unit testing project (which is good practice) you will find you do not have access to non-public methods. Sometimes you want to test a method but you do not want to make it public to other assemblies. In this case you have the option of making the method internal eg. [...]

How to Create a Game Loop in Windows Forms .NET

Posted by stevenmarkford on September 30, 2010 at 4:20 pm

Introduction: A game loop is one of the most fundamental requirements for a game, it is what makes the game move forward in time, that is, real-time. This is opposed to a standard forms application which is non real-time and requires user’s input to function. Note: This is not in any way best practices and is not [...]