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.

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>();

HtmlDecode and MVC

Just a simple tip when you try to use HtmlDecode in MVC (Razor) - don't use WebUtility.HtmlDecode, it won't work.

Just use Html.Raw instead:

@Html.Raw(item.Description)

It really helps to know your Html Helpers.

Html.Raw was introduced in MVC 3.

Don't Forget to Specify maxVersions for Your EPiServer VPP's

This is just a friendly reminder - when using EPiServer VPP, don't forget to specify maxVersions for each virtual path in episerver.config. By default, maxVersions is set to 5 for Documents, but nothing else.

One often forgotten feature of EPiServer VPP's is the actual versioning of files. It might be handy at times, but it's also handy remembering its drawbacks.

There might be a scenario where you have a scheduled job creating a large page structure and saving a lot of files for every page. Now imagine this job runs a couple of times every day - after a while you'll eventually run out of disk space.
(Of course you can probably write a file comparer to make sure the same file isn't uploaded multiple times.)

Make sure to specify maxVersions for Global Files, Documents and Page Files to be in complete control. More often than not, 2-3 versions are enough, rather than an infinite amount of versions ;-)

To the top