dileno

Subscribe

Hi! I'm Martin Söderlund, the owner of this blog. I work as a web consultant in Stockholm, Sweden. My main focus areas are .NET development and interface development.
If you've got something on your mind, feel free to contact me.

Close

Thank you for visiting!

Please consider subscribing to the RSS feed or following me on Twitter.

Faster Visual Studio Debugging With ReAttach Extension

Do you often find yourself trying to attach to the correct w3wp process in order to debug your web application? No more!

There's an excellent Visual Studio extension out there called ReAttach. It let's you magically reattach to the latest debugged process.

Download ReAttach extension

Debug faster in VS with ReAttach

Once you've installed ReAttach, make sure to use its inbuilt shortcut or create your own. I added my own as Alt+R in Visual Studio:

Tools->Options->Keyboard->Search for reattach and assing Alt+R shortcut

Also it helps if you know what w3wp process to attach to in the beginning. Use the list wp command under Visual Studio tools for this. Read more on finding the right web process at the Nansen blog.

AJAX Get and Cache

Recently I fetched a MVC view with AJAX GET ($.get()) and it worked most of the time in most browsers. However at times I got a cached version of the view.

How to solve this? Easy. Just switch to $.ajax and add cache: false to your AJAX request:

$.ajax({
	url: '/shop/cart',
	cache: false,
	success: function (data) {
		$('#cart').html(data);
	}
});

AJAX calls are by standard GET so there's no need to specify it. Above is enough.

404 When Browsing to WCF Service

If you simply get a 404 message when browsing to your WCF service, you probably are missing the necessary components for WCF.

To do this, simply go to Windows Features and Turn Windows features on or off and make sure the correct boxes are ticked under .NET Framework 3.5 and .NET Framework 4.5 Advanced Services:

Activate WCF.

Type Initialization Exception with EPiServer, StructureMap and WCF

Recently I got an error message working with EPiServer, StructureMap and a WCF service:

StructureMap Exception Code: 202\nNo Default Instance defined for PluginFamily

It turns out I forgot some StructureMap configuration. Adding this configuration solved the problem:

For<ISearchService>().Use<SearchService>();

To the top