0
votes

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

2
I have just found that the .xap file is really just a compressed folder holding the files required by silverlight to operate. Ie, changing MySilverlightApp.xap to MySilverlightApp.xap.zip allows you to open it and see the included files. Still doesn't solve my problem, however.awrigley
Have looked at the server console. It seems .xap files are not registered. Will get the server people to register the .xap extension. Getting closer!awrigley

2 Answers

0
votes

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.

0
votes

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.