locked
How to debug the Silverlight example RRS feed

  • Question

  • A combination of Silverlight and DSS has a good bit of potential for extending some of our products. We target both PC and CF in an industrial environment so MSRS is very appealing.  However I've gotten stuck on just debugging the silverlight example. I updated the project fine however I get an invalid URI and after I correct that I've been getting a securityexception when reading the response.  When I run the Silverlight XInput UX in the DSSHost I get the "Install Silverlight" button which still points to Beta 2.0 which isn't available. The example doesn't seem to be updated since the July CTP.

    Is the Silverlight example ready? Is this being supported? How does one debug the example? I'd really like to see this working before I invest a lot of time building a prototype to demo to our management.
    Thanks
    Mike
    Wednesday, January 21, 2009 5:23 AM

Answers

  •  Hi Mike,

    To debug the Silverlight part of the page provided by a DSS node you can not use the default F5 Visual Studio way. The way that does work is to open the web page first in IE, then in VS do "Attach to Process" (Ctrl-Alt-P if I'm not mistaken) and select the IE process that has your Silverlight page in it. If there is a start up timing issue that you need to catch I would suggest putting in something on the web page that requires user input (such as a button) and then resuming after you attached, and clicked on that button.

    From a CE node you should be able to serve the pages just fine to a windows machine. Trevor can probably correct me if I'm confusing something here.

    Pavel

     

    Wednesday, February 4, 2009 7:21 AM

All replies

  • There was an unfortunate cross-over with Silverlight. The final V2.0 was released after we had frozen the code for V2.0 of RDS so our code shipped set up for Beta 2 of Silverlight. However, there is an easy fix for the sample.

    1)      In “samples\UX\XInputGamepad\GamePad.xslt” in the line with the “<object>” tag the “type” property needs to have the “-b2” at the end of it removed.

    2)      The “samples\UX\XInputGamepad\XInputGamepad.sln” needs to be recompiled.

    3)      The “samples\UX\XBoxControllerViewer\XBoxControllerViewer.sln” needs to be opened in VS, converted, and recompiled.

    To run the sample, you need to start a DSS node and the XInput Game Controller service.

    • First open a DSS Command Prompt. Then enter the command:
      dsshost /p:50000 /t:50001
    • Start a web browser and browse to localhost:50000
    • Select the Control Panel from the menu at the left.
    • Locate the XInput Game Controller in the list (its at the bottom) and click on the Create button.
    • Select the Service Directory from the menu.
    • Click on the xinputgamepad service and you should see a picture of an XBox controller.
    • Press buttons, wiggle the thumbsticks and generally have fun!

     

    Trevor

     

    Monday, January 26, 2009 6:01 AM
  • OK,

    I can get the example running from the link running in the DSS which is great, I can see the controller (and have a little fun). I had figured out everything except the "-b2" bit.

    How do I debug the Silverlight application? When run the application I get a System.NotSupportedException with "The URI prefix is not recognized." on line 51.

    Uri uniqueUri = new Uri(webServiceUri.AbsoluteUri + @"/" + DateTime.Now.Ticks.ToString());

    The uri is {file:///C:/Users/mmiller.NATICK-NT/Microsoft Robotics Dev Studio 2008 Express/bin/TestPage.html/633685740115575767}

    One other technical question.

    If I host the dsshost on a WinCE device, can I have it launch the Silverlight page on a Windows (or whatever else Silverlight runs on) client when I browse to the control panel?  If so is there a way to go straight to the status page without the Robotics Studio control panel on the left.

    Thanks for your help I am going to see if I can get a basic example running in our framework.

    Mike

     

     

    Monday, January 26, 2009 7:50 PM
  •  Hi Mike,

    To debug the Silverlight part of the page provided by a DSS node you can not use the default F5 Visual Studio way. The way that does work is to open the web page first in IE, then in VS do "Attach to Process" (Ctrl-Alt-P if I'm not mistaken) and select the IE process that has your Silverlight page in it. If there is a start up timing issue that you need to catch I would suggest putting in something on the web page that requires user input (such as a button) and then resuming after you attached, and clicked on that button.

    From a CE node you should be able to serve the pages just fine to a windows machine. Trevor can probably correct me if I'm confusing something here.

    Pavel

     

    Wednesday, February 4, 2009 7:21 AM
  • Am I correct in assuming that the Silverlight example will only run on a 32 bit OS since the Microsoft Xbox controller is not supported on 64 bit Vista?

    Are there any examples available that will run on 64 bit Vista?
    Monday, March 16, 2009 10:16 PM