As part of setting up the environment we must be careful to do the following points
Changing the MIME type in IIS to support Silverlight application. This can be done as follows
1. Open run window from Start Menu
2. Enter inetmgr and click OK
3. This will bring up the Internet Information Services Manager. From the folder structure on the left side, select the site which is your Sharepoint application.
4. Now from the right pane select "Mime Types" and "Open Feature"
5. In Mime Type View, Click Add, add the file extension, and type .xap as the file extension and "application/x-silverlight-2" as the Mime type.
In the web.config of your Sharepoint application, add the required configurations.
Make sure the System.Web.Silverlight.dll is in the GAC