views:

21

answers:

2

Hi

New to Silverlight, I have an app that I am trying to test. Works fine on DEV machine, when I upload to the server, no errors are returned, but no app either.

I have uploaded:

  1. TestMySilverlightApp.aspx
  2. ClientBin/MySilverlightApp.xap
  3. silverlight.js

Have I missed something?

Many thanks

EDIT:

Firebug tells me that I have a 404 not found error on the .xap file, which is a bit of mystery, as it is there, where it should be. Beginning to think that it might be a server configuration issue.

EDIT 2:

I am increasingly certain that the problem lies with registering the .xap extension with IIS. However, there also seem to be issues if you have silverlight 2 and silverlight 3 installed on the same machine. My code uses silverlight 3, but I have no idea what is on the server as I pay for a fully managed server.

Two articles throw some light on these problems:

Probelm with Two versions of Silverlight

Register .xap extension with IIS

A: 

You might have to paste some code, but my first guess is that the server is looking at the wrong location to find the .xap file. Perhaps a relative vs absolute path issue?

edit: from msdn,

you need to add the MIME types for those file extensions to your web server so that it recognizes Silverlight content appropriately. Here are the MIME types you need to add to the server configuration: Extension MIME Type
.xaml application/xaml+xml
.xap application/x-silverlight-app

There are links on how to add the MIME types for IIS 7/6/5/4 at the link above.

vlad
I will trundle off, check again and report back. Methinks not, but...
awrigley
Nope, sadly not. ClientBin/MyApp.xap is the correct url. I have tried making the url absolute, but doesn't work either. I think there is either an issue with the version(s) of silverlight, or I just need to register the .xap extension with IIS. Can't do it myself as no access to the server, just a console.
awrigley
Thanks Vlad. As an alternative to the article you mention, there are also the articles mentioned on my edited post. I guess you were writing your post as I edited mine...
awrigley
A: 

The correct answer is that I needed to add a MIME type for the .xap file extension.

The articles mentioned in the second edit of my original post give all the information I needed to set this up on the server.

Problem solved.

awrigley