IE 11 can’t connect to localhost?

IE 11 can't connect to localhost?
Similarly to Windows 8.x modern apps, Internet Explorer 11 can’t connect to a site running on localhost by default. To correct this “feature”, you can use the EnableLoopback Utility. Check the entry windows_ie_ac_001 and save changes.   Now just refresh the page in IE and you’re all set.    

Windows Store apps: StreamSocket connection to localhost

Windows Store apps: StreamSocket connection to localhost
The problem: running unit tests on a Windows Store app that connects to a port on localhost results in the error “A connection attempted failed because the connection party did not properly respond after a period of time …”. Connecting to a loopback address (127.0.0.1 or localhost) is not supported in a Windows Store application. ...

Windows Store Apps: Threads to Tasks

If you’re updating an old .NET code base to a Windows Store app, you may notice that the Thread class is no longer available.  Instead, we have the more sophisticated Task.  If you have a lot of Thread usage in your old code, you may find a re-write of the threading code to be a ...

Windows Azure Deployment Tips & Tricks

I’ve run into a few gotchas when deploying to Azure. Missing DLLs. Not all “system” libraries are included in the Windows Azure run-time environment.  If you use any of these, make sure to mark them as CopyLocal=true in your project.  The one I always forget is EntityFramework.dll. Folder permissions.  If you add local storage folders ...

Windows Azure: Where is my stuff?

So you’ve deployed an application to Azure.  If you login to the deployment with Remote Desktop, your first question might be “Where is my application installed?”. There are three disk drives in the deployment. Drive C: contains your local storage folders Drive D: is the operating system Drive E: contains your application files Local Storage ...

PDX Code Camp Session: WP7 Tips & Tricks

PDX Code Camp Session: WP7 Tips & Tricks
I presented the Windows Phone 7 Tips & Tricks session with Allen Newton yesterday at Portland Code Camp.  Good times.  In our talk we showed a sample application “PDX Chow” that demonstrates a number of phone development concepts: MVVM architecture with Laurent Bugnion’s MVVM Light Panorama control Inversion of Control / Dependency Injection Navigation using commanding and ...

System.ServiceModel.ProtocolException: An HTTP Content-Type header is required

The full exception message is “An HTTP Content-Type header is required for SOAP messaging and none was found.”. If you’re writing a WCF service that returns Entity Framework entities, you may run into this error in your client application. To correct it, open your EDMX file in the service project and change the Lazy Loading ...

Silverlight 3 Navigation: My HyperlinkButtons don’t work!

The navigation framework of Silverlight 3 is great.  The URI mapping and browser history support add a lot of value. When upgrading a Silverlight 2 site to use Silverlight 3 with navigation, I was surprised to see that all of my HyperlinkButtons that referenced external URLs were failing! For example, a button with this XAML: ...

.NET 101

If you find yourself wanting yourself to share some C# brilliance related to… The difference between Object.Equals() and == How string comparison is an interesting special case Why class instance memory is not necessarily reclaimed when an instance goes out of scope Which of Stream.Close() and Stream.Dispose() should be called (or both) Please remember that ...

Doing the dishes

Doing the dishes
While washing all of the coffee cups left in the office sink by others this morning, I was reminded of a lot of code I’ve seen lately. How often do you open up a piece of code in Visual Studio to find something implemented in a completely ad hoc way, or only half done?  Swaths ...