My PageProvider returns no pages... on the first request

I spent a little time yesterday building a simple little PageProvider. For the record, it was an RSS PageProvider that would read an RSS fead and present the entries as pages... Not very complicated or special, but it needed to be done. It's going to be one of the exercises in the new advanced developer course for EPiServer. So, what was the problem...well...my provider worked, but only when I refreshed the page. The initial request would come up empty, but when I refreshed the page it would show up as it should...

More...

EPiServer GUI-plugin without ascx or aspx file

When creating a GUI-plugin you are basically either creating a usercontrol (ascx) or a webform (aspx). The problem with this is that when you deploy your plugin you have to deploy both an assembly and a second file. The location of the second file is of utmost importance since it is defined in the GuiPlugInAttribute's Url property. Is this a problem? Not in most cases, but once in a while it is. Can it be solved? Of course...

More...

Back from Oredev

I just came back to Stockholm after spending a few days at Oredev in Malmö. Oredev turned out to be a fantastic event. I arrived in Malmö late Tuesday afternoon and checked in to my hotelroom in the center of the city. Later that evening I got in my "costume" aka suit. I very rarely wear a suit and instead stick to baggy jeans and a hoodie... But since the speakers dinner that night was in the Town Hall, I went for a suit. It ended up being a bit overdressed, but hey...I like looking good once in a while...

More...

Dynamic display causes JavaScript bridge to fail in Silverlight 2 - Update

The problem I wrote about earlier talking about the JavaScript bridge failing when the plug-in is in a div that has it's display set to hidden, is still in Silverlight 2 RTW. But I figured out why. When the plug-in is in a hidden div, the bridge doesn't work, and showing the div from JavaScript and calling the plug-in directly after isn't working either. I tried doing the following, without success:
[code:js]
var hostDiv = document.getElementById("silverlightControlHost");
var plugin = hostDiv.childNodes(0);
hostDiv.className = "hostDivVisible";
plugin.content.ScriptableObjectRef.CallMethod();
[/code]

More...

Annoying "feature" when using Linq to XML in Silverlight projects

I know this has a simple fix, but the error message might not be too clear to some people. If you try to use Linq to XML you must first start off by adding a using statement for System.Linq.Xml. This is very easy to do... Just write the initial XDocument, with the right casing, and then press "Ctrl+." and then enter. This will add the using statement and you can keep going. So you start writing your query but it doesn't work.

More...

Deep Zoom Composer & Silverlight 2

I just found an interesting thing... I just created my first Deep Zoom application. I know...I'm way behind most people, but I stick to something and learn it well before moving on. That's just the way I am. Well, back to topic. I added my images to the Composer and set them up as I wanted them and then exported my project. I choose to include a Silverlight app with the export. When I tried watching it in my browser, I got a message saying that I needed to get Silverlight.

More...

A bragging post...

Once in a while you do get the possiblity to do something that is gonna be seen by the developer community more than others things you do. This week I got to create my first screencast for Microsoft Sweden. It turned into a WAY too long screencast covering basic development in Silverlight 2.0. Beside being shown and talked about on a couple of different blogs on the web, I also had the privilege of getting mentioned in the Swedish MSDN newsletter. So as I said...a pure brag entry telling the world that I got to do something cool. Unfortunately for all the enlish speaking people out there, the newsletter as well as my screencast is in swedish. But for the rest of you here are a couple of places where you can see or read about it:
http://blogs.msdn.com/robf/archive/2008/10/14/introduktion-till-utveckling-med-silverlight-2.aspx
http://www.microsoft.com/sverige/msdn/mail/2008/msdnNyhetsbrev_081016.html
http://labs.episerver.com/en/Blogs/Per/Archive/2008/10/Sample-Silverlight-2--Dynamic-Content/
Somebody actually cares...maybe...might be that i know both Robert and Per and that they are just being nice to me...but I don't give a damn...I...Chris Klug was mentioned on the world wide web by other people than my family...

Dynamic display causes JavaScript bridge to fail in Silverlight 2b2

 I ran in to an interesting little feature in Silverlight 2b2 the other day. I was trying out a little idea I had. What would happen if I placed a Silverlight application with a width and height of 100% inside a DIV and then tried resizing the DIV using the HTML DOM bridge...? Well, I created a simple Silverlight application, which was basically a big button, and in the Click event I used the JavaScript bridge to resize the DIV dynamically. Worked like a charm. The DIV resized and the application followed along, just like I wanted. Until I started tweaking... 

More...

The complete n00bs guide to custom properties

One of the more usefull extension points in EPiServer is the ability to create custom properties. That and GUI Plug-Ins. Those 2 extensions are probably the easiest and most used way to extend the functionality in EPiServer CMS. So how do you create a custom property? Well there are several ways to learn it. You can either go to one of our courses at EPiServer, and maybe even meet me, or you could read an article about it on http://world.episerver.com. It is actually a good article written by one of our developers in Ukraine, Denis Yakovlev. But you could also read this blog entry.

More...

WCF Services and EPiServer

I just spent some time trying to get my WCF Service to work on my EPiServer CMS 5 R2 installation. It was a lot more complicated than I thought it would be.

I had built this Silverlight application using a test application, launching it in the VS webserver and everything was working fine. It was a small Silverlight application that used a WCF service to get some data from the server. The epplication worked perfectly...until I decided to deploy it to my "real" site using IIS 7... The "real" site was an EPiServer application which caused some problems.

I deployedmy Silverlight app as well as my service to the site I was going to use. Deploying the application meant copying the xap file as well as the svc and assemmbly to the server. I also copied my service configuration to the web.config file. After this I opened my browser and browsed to localhost. And behold...a broken Silverlight application. The application started, but soon came to a screeching halt as it tried to connect to the service. Since the application actually loaded, I came to the conclusion that the IIS configuration for the Silverlight things were ok and that it was the service that was the problem.

More...