locked
What state is returned by the DssHost.exe when browsing to Dss Node? RRS feed

  • Question

  • When I start a DSS Node and specify /p:50000 then browse to http:localhost:50000 I get some XML returned with information on the currently running services, like their contract, their icon URI, ect.

    Now, I am tying to use the static DssEnvironment class to host a DSS Node inside of a WCF service. I want this service to be able to return exactly the same XML that is returned by http:localhost:50000, but I can't figure out what message(s) I need to post, on which port(s) to get this information from the DssEnvironment.

    So far, I have found that I cannot post an HTTP Get message to any port I get directly from the DssEnvironment becuase doing so causes a NotSupportedException to be thrown with the following message "HttpRequest operations are for internal use only and can only originate from outside the node, from a non DSS component"

    I have gotten pieces of the information I need by posting Get messages to DssEnvironment.ControlPanelPort, DssEnvironment.DirectoryPort, and calling DssEnvironment.QueryServiceContract("", false). This process is complicated though and feels bug prone - not to mention the process of putting that information into the same XML format as DssHost.exe.

    Given that the DssEnvironment already generates the XML that I want, it seems like I should be able to make a single request to get the information I need in the format I want.

    What does DssHost.exe do when it gets an HTTP Get message? How can I re-create the response as simply as possible? Do I need to post several messages, or just one to the correct place?



    • Edited by Kobe1815 Friday, March 23, 2012 6:19 PM
    Friday, March 23, 2012 6:06 PM

Answers

All replies

  • RDS was not designed with this type of interaction in mind.  The internals of the DSS runtime are just not exposed in such a way as to enable this behavior.  Why are you trying to replicate the behavior of DSSHost?

    Perhaps if you explained more about "Why" you need this, or what you are trying to accomplish in the long run.  Is this a robotics problem, or are you using DSS for some other domain?

    I'm guessing this is your latest attempt to solve the problem of customizing the home page as described in these threads (also started by you) ...
    http://social.msdn.microsoft.com/Forums/en-US/roboticsdss/thread/2ae8f3b5-9d4c-407b-9a9e-9acc6beb99e1/#05923319-611d-45af-9070-75265283a2da

    http://social.msdn.microsoft.com/Forums/en-US/roboticsdss/thread/a243b965-ce4f-4dc8-8e46-fd5010bbb92a/#62e01831-8302-4d24-95f6-a4bd461720b9

    Have you tried this...  http://msdn.microsoft.com/en-us/library/bb608245.aspx

    According to that you should be able to create a replacement to dssbranding.dll that has the resources you wish for things like the default xslt as described here.  http://social.msdn.microsoft.com/Forums/en-US/roboticsdss/thread/57b87ca4-4427-4a88-8678-d14970176d0a

    If that doesn't work, I am afraid you are out of options.

    Saturday, March 24, 2012 12:47 AM
  • Thank you for the response Gershon Parent.

    I am working on using DSS in a business application that has nothing to do with robotics. Since I cannot secure nor customize the home page of the Dss Node the way I need to I am shutting down HTTP messages on the DssEnvironment class, so that no one can access the Node home page. When I do this thought, I loose all ability to update, monitor or access the node directly.

    My approach now, is to create a custom WCF "wrapper service" that recieves messages from the outside world, then translates those messages into commands to the static DssEnvironment class. The wrapper service is then responsible for getting getting the DssEnvironment's response(s) to the command and sending them back to the orignal requester. This way, I can return whatever HTML, XSL, ect. in response to requests that are secured through my own mechanisms to meet my needs.

    I am not trying to replicate the  behavior of the DSSHOst per-se. Rather, I am trying to secure the DssEnvironment and customize the user's interface to it.

    Does this provide more context to my first question? I realize that the robotics platform was not created with this purpose in mind, but it doesn't mean that it can't support it. Perhaps the most useful thing to me at this point is just to know if this is a bad idea before I spend any more time on it. I know it is not a great idea, I'm just affraid of spending anohter week or two on this approach just to find out that I am heading into a brick wall.


    • Edited by Kobe1815 Monday, March 26, 2012 3:15 PM typos, clarity
    Sunday, March 25, 2012 10:53 PM
  • You are definitely operating outside the realm of intended use so I can't promise a solution exists.

    I still think your best bet is using dsshost.exe.config to specify a new key value for "Microsoft.Dss.Core.DefaultRuntimeResources" (as described here: http://msdn.microsoft.com/en-us/library/bb608245.aspx) and pointing it to a dll that replaces "DssBranding.dll".  That new DLL will include paths to the default xslt in its resources (as describe here http://social.msdn.microsoft.com/Forums/en-US/roboticsdss/thread/57b87ca4-4427-4a88-8678-d14970176d0a)

    From the looks of that you should be able to replace the home page, service directory, Securiy manager and anything else.

    Monday, March 26, 2012 9:23 PM