views:

45

answers:

1

Developing a silverlight page in already existing web application for previewing video files. When I create a asp.net application locally and add silverlight application on the solution it works perfectly. But while I am trying to include into already existing project it throws this error. I have not deployed into the IIS. this happens while debugging.

A: 

Check the path to your xap file in your webpage. It should be something like:

 /ClientBin/my.xap

Also ensure that your xap file is actually in the ClientBin folder. In the web application Properties, choose the Silverlight Applications tab and add the silverlight project to the list.

Although probably not applicable in your case, this can also occur if you are using iis and haven't registered the correct mime type for .xap files. It should be set to application/x-silverlight-app.

geoff
I tried all above mentioned.. but nothing helps..
Joseph
@Joseph - try using a tool like fiddler (http://www.fiddler2.com/fiddler2/) to see where the xap is being requested from and what is being returned. It might help you debug the issue.
geoff
@Joseph - Is your silverlight building without errors?
geoff
yes, there is no error while building, but at runtime, it thorws error
Joseph
Is the xp file properly formed. Its just a zip file so open with something like 7zip. Compare the contents to the xap in your working solution.
geoff
Delete the xap in the ClientBin folder and re-compile. Is it recreated?
geoff
yes it is recreated.. once if I delete it, and build it..
Joseph