Debug Silverlight component from MVC application Visual Studio 2010 - silverlight

In my solution I have a MVC project. Then I added a Silverlight project. When I added the Silverlight project, I set to include it in the existing web application (MVC project).
It added an .aspx page that contains the Silverlight component. The problem is that I cannot debug into the Silverlight code when I start the ASP.NET MVC application. I set a breakpoint in the Application_Startup function in the Silverlight code, but it never stops there. On the breakpoint I have a tooltip:
The breakpoint will not currently be hit. No symbols have been loaded for this document
How do I fix this problem?

Which browser are you using? I've had mixed results with debugging Silverlight with anything besides Internet Explorer, so I'm making sure to use Internet Explorer when developing Silverlight applications.
If you're using Internet Explorer, then Evan's solution should work (at least that's what has stopped me some time - Silverlight debugging disabled in the web project).
Also check that your Silverlight application is present in the list located under Web project properties > Silverlight Applications.

I found the problem. The browser was caching the Silverlight application. I solved that with the following code when initializing the Silverlight component:
param name="source" value="ClientBin/form.xap?<%= DateTime.Now.Ticks %>"

Related

Silverlight Object Loads Then Disappears

I am using Windows 7 Ult., IE9, Chrome. I have just installed Silverlight 5 and am trying to develop an app using DevExpress DXMap control and Silverlight. However, I am having issues with Silverlight it seems. When I go to this site (http://www.silverlight.net/learn/overview/what's-new-in-silverlight-5/introduction-to-silverlight-5-3d) to watch a video on the Silverlight 3d feature, the video player which I believe is a Silverlight control loads, but then disappears. When I run the app with the DXMap control, the page loads a blank area with only the zoom control, navigation pad, and scale visible.
I have tried finding a solution to this problem, but have not been successful. Any suggestions?
Okay, I found out what was the issue. I thought that not checking the "Host the silverlight application in a new web site" option (since I never had a website as yet) would let the application load on its own, but I had to enable the "Host the silverlight application in a new web site" option to get it associated with a test page.

communication between silverlight plugin and mvc project without using WCF

I just need a help regarding the communication between the silverlight plugin which uses webcam and gives response to the mvc application.I just need the breakpoints to be hitted on the silverlight project run mode that are not hitting for the moment.
Any help will be highly appreciated..
On Solution Explorer of Visual Studio right click on your web project and select Properties. Go to the Web tab. In the bottom under Debuggers check Silverlight checkbox. After that you can debug your Silverlight application.

Silverlight debug problem blank page

I have a Visual Studio 2010 and silverlight 4 over it. When I'm trying to run a simple application hello world in a browser, it shows only the blank page.
The type 'Deployment' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
I think the problem is above but how can I solve it?
did you use silverlight with web application? When you create a silverlight app it have one web site associated. On the default.aspx, you have the object. Check the parameters off the object and verify if everything is ok and you have installed all components that support it.

TestPage.aspx in silverlight

I am a beginner in silverlight. I want to know what is TestPage.aspx and TestPage.html in silverlight. Actually i have google it but din't get enough information. Can any one give me answer??
TestPage.aspx and TestPage.html are the pages which will host your Silverlight content. As you might know, Silverlight is just a project (not a web application) and needs a page that can host it.
These pages are created by default and help you to test your XAML content during your development, which you can later remove from your project.
TestPage.html is dynamically generated by the Silverlight application as part of the Debug process. If you take a look at the Debug tab for the application properties you will see an option to Dynamically generate a test page. If this is selected then you TestPage.html is created in the /Bin/Debug folder of your Silverlight application.
A better solution is to create a web application in the same solution as your Silverlight application then in the properties for the web application go to the Silverlight Applications tab and add your existing Silverlight app to the web project. Also make sure that the Silverlight checkbox is ticked in the Debuggers section of the Web tab of your web application.

Silverlight blank browser

I've got a problem with the Silverlight default VS2008 project. Wnen I create a new SL project and choose ASP.NET Web Site web project type all is ok - in my browser I see default template. But when I choose ASP.NET Web application and run it I get blank browser screen with js error: Unhandled Error in Silverlight Application Code: 2104 Category: InitializeError Message: Could not download the Silverlight application. Check web server settings. What's wrong?
Yeah, this happened to me too. It was my MIME types that were not added. You may need to add these to IIS:
.xaml application/xaml+xml
.xap application/x-silverlight-app
.xbap application/x-ms-xbap
Here's a tutorial on how to do so: http://learn.iis.net/page.aspx/262/configuring-iis-for-silverlight-applications/
If this isn't the issue, two other things to check:
Is your project targeting the right
.NET framework (3.5 instead of 2.0)?
Is your start-up projec the ASP.NET
web site project?

Resources