MSRS and SIlverlight RRS feed

  • Question

  • I have run the Silverlight viewer sample for the Xbox controller, but I am having a problem understanding how the Silverlight app is geting the data.

    1) Is the statment in the help file "A viewer for an Xbox Controller is also available that was written as an example of using Silverlight, but it does not currently have a documentation page." still correct? Is there any documention you can point me to?

    2) The specific piece of code that I would most like to understand is Page.xaml.cs. More specifically lines 30-56:



    public Page()






    webServiceUri =


    Server_Uri.Text =

    "Connecting ...";




    catch (Exception e)


    Server_Uri.Text =

    "Inner ERROR! :" + e.GetType().Name + " " + e.Message;




    void RefreshControllerState()


    Server_Uri.Text =



    if (webServiceUri != null)



    // make the uri unique so that it's not grabbed from IE cache


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


    HttpWebRequest _request = (HttpWebRequest)WebRequest.Create(uniqueUri);

    _request.Method =



    new AsyncCallback(ControllerResponseCallback), _request);




    How are webServiceUri & uniqueUri built and used?

    Thursday, April 16, 2009 3:37 AM


  • Hi John,

    As you can see on top of the code you pasted in webServiceUri is set to:

    webServiceUri = HtmlPage.Document.DocumentUri;

    The uniqueUri is also in that code:

    uniqueUri = new Uri(webServiceUri.AbsoluteUri + @"/" + DateTime

    Which is used to get the state of the service and display it.

    I'm not sure if this answers you quesion, play around with the code and feel free to ask for some more details or specifics.

    Wednesday, May 6, 2009 8:59 PM