How to properly set up a silverlight app for debugging?
First of all, this is my first attempt at a silverlight app and it's a prototype.
I have a pre-existing solution with multiple projects. One of those projects is a web portal that has a services directory and publish a .asmx. I added the silverlight app to my solution.
When I run the silverlight prototype, it gives me the message: "The silverlight project you are about to debug uses web services. Calls to the web service will fail unless the silverlight project is hosted in and launched from the same web project that contains the web service."
That's fine. How do I do that? When I run the silverlight app directly, it runs in the browser as "C://file/.../PrototypeTestPage.html"
I tried taking that HTML file and adding it to my portal and then navigating to the HTML file. That just gives me a blank page. After the page loads, the browser shows a "Waiting for localhost..." as if it's making the service calls, but my breakpoints on the service calls aren't being called.
Can someone give me some pointers? I'm sure I'm just missing some obvious bas开发者_JS百科ic step.
You should run the web project that is ultimately hosting the silverlight app, and that project should be the same project that is providing the web services for the silverlight app. So if your silverlight app is foo and you have a web project foo.web that contains a web page with the object tag that loads up your silverlight xap, then that is the project to debug.
UPDATE: this has been resolved with latest updates. No you may just: 1) go to SL Project properties and "enable running out of browser" checkbox. 2) go to SL Project Debug and select OOB and choose your web application name in the combobox. 3) make you SL App as startup object and disregard warnings about starting SL in wrong way because they are false (bug), you will see you app running well.
精彩评论