views:

968

answers:

4

Hey everyone

I have a Silverlight application and when I click 'run' IE starts up and nothing is shown. I get an error icon in the bottom left that when i click i get the following error

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Timestamp: Wed, 25 Nov 2009 00:11:41 UTC

Message: Unhandled Error in Silverlight Application Code: 2103
Category: InitializeError
Message: Invalid or malformed application: Check manifest

Line: 54 Char: 13 Code: 0 URI: http://localhost:50511/TestPage.html

Why do i get this error? And how can i fix it?

I have looked around and other people seemed to of got this error when they renamed their application, however i haven't done this.

I have created a custom style, if that might have anything to do with it.

I have done no coding, all i have done is dragged on my style's controls and linked the pages.

Any help would be very welcome

A: 

I've had this error in a few circumstances. Check that the Startup Object in the properties is correct (any namespace changes?). Be sure to explicitly add your silverlight project as a dependant project for your web project, this is not done by default. Re-add your silverlight project under the Silverlight Applications in the web project's properties. Make sure that the App.xaml x:Class matches the code behind namespace and class name. Hmm, I think those are the usual tricks.

Hope this helps.

-- Nathan Allan Database Consulting Group

N8allan
Thanks for that Nathan, the solution was created in Blend so all the projects were setup correctly and all the code was dynamically generated. I had at look at the code in the Namespaces and it seemed correct. I hadn't renamed the project
Lango
A: 

Hey, The error occured when i went object->Edit Style-> Edit A Copy on a 'Sketch' style object. I put the new style in a new resource.

When I removed these styles the error went away. I then remade the styles i wanted from scratch, instead of editing a copy and i did not get the error.

Thanks everyone for their help. Sorry it took me a few days to get back to everyone.

Lango
A: 

Check to ensure all of the prerequists are installed on the web server. I struggled with this for over 4 hours. Every posting on the web talked about changing the Namespace which I did not do. I eventually decided to try my application on another webserver and the problem went away.

Thanks to everyone posted their fix, but if all esle fails try another computer or check your prereqs.

Antwune
A: 

I got this error when I deleted a resource dictionary from my project that was referenced in App.xaml. Visual Studio built the solution fine and gave no indication that anything was wrong.

When I remembered to delete the line from App.xaml, everything worked fine.

schummbo