views:

45

answers:

1

In my Facebook Canvas application i have the following problem:

The Facebook application is running in an iframe inside Facebook.

Basically it is an ASP.NET MVC application with two different silverlight apps nested in two different Views(and different controlls)

If the user is in one silveright control the user should be able to navigate to the other silverlight control and exit the old silverlight control. (all of that should happen in the facebook canvas application)

Until now i tried it with:

HtmlPage.Window.Navigate(new Uri("http://apps.facebook.com/appname/Game/Index?opponentId=" + opponentId));

It somehow tries to navigate but not correctly. I just see a link and the facebook logo inside the iframe. When i click the link it navigates correctly.

You can see the result here: http://hospero.de/facebook.jpg

How could i correctly navigate to the new silverlight control inside the facebook iframe?

Thanks in advance

EDIT:

Now navigating to the page containing the new Silverlight control works.

But somehow it can't download it. That's strange because the same Control works when testing seperatly.

I get the following error:

Unhandled Error in Silverlight Application  Code: 2104

I investigated what that error could be and most of the time it had something to do with MIME types.

But how can that be if my first control gets loaded perfectly?

+1  A: 

You are using the app url when you need to use the local url. So navigate to:

http://YOURDOMAIN.com/Game/Index?opponentId=" + opponentId

and not

http://apps.facebook.com/appname/Game/Index?opponentId=" + opponentId

because otherwise you are loading Facebook again within the iFrame as you are seeing

BeRecursive
Thanks your solution works but somehow i get new issues.
Ben