locked
Some Basic Problems RRS feed

  • Question

  • Hi Every One;

     

    I'm new to Microsoft Robotics and I'm having some problems with the tutorials. First of all I mention that I'm using Windows XP, Robotics Developer Studio 2008 Express and Visual C# 2008 Express.

     

    1- I can't debug my programs in VPL. When I press F10 to debug, my browser opens but before showing anything it asks for a username and password and I don't know what this is. The tutorials don't  mention anything about a user-pass prompt. I've tried entering my Windows login user-pass but it was no use. I thought it might be my antivirus program but that wasn't the problem either. Please help ...

     

    2- I've got the same problem when trying to run a DSS Node. My browser opens and it asks for a username and password. I think this problem is related to the previous.

     

    3- Another problem is when creating a new DSS service of my own. I write a simple "Hello World Service" using the Visual C# 2008 Express template, and after I build and run the program, the command prompt won't stay up and it closes immediately without any errors. According to the tutorials, the command window must stay up and running so that I could use my browser to go to the URL for this service (which is like: http:// localhost:50000/ MyServiceName). I don’t know if this is important but, the location of the solution file isn't in the Samples directory and it's in another arbitrary location.

     

    Many Thanks

    Tuesday, December 9, 2008 8:27 AM

Answers

  • If the SecuritySettings.xml file is missing then DssHost uses default values. This is standard practise for config files.

     

    Are you running under and Administrator account? Most people do, and that changes the scenario.

     

    As Erik says, services should be under the root (or mountpoint) for RDS. The problem with the DSS Command Prompt flashing up and disappearing is because there was an error. If you look in the Project Properties in the Debug tab you should see the command line that is being executed when you try to run the debugger. It simply runs DssHost and specifies a manifest. You can open a DSS Command Prompt youself and type exactly the same command. That way the window will not close and you will get to see what the error message is.

     

    Trevor

     

     

    • Marked as answer by Seyed Mohammad Saturday, December 13, 2008 7:45 AM
    Wednesday, December 10, 2008 2:46 AM
  •  

    Hi everyone;

     

    Sorry for the late reply.

    Thanks Trevor. You sure guessed it! There was an error and the problem was the command line arguments in the debug tab of project properties. The error was that the path to the manifest file was incorrect and after that I changed it with the correct value the problem was solved. So the 3rd problem is solved. The inconvenience is that you have to do this for every new project! I can't understand why the default value is set incorrect by Microsoft!

     

    Also I thank Erik for his reply. I didn't see the VplHost32.exe.config file before you told me; but unfortunately disabling the security key in this file didn't solve the problem either. After disabling the security key, VPL came up with an error.

     

    I searched the forum for "SecuritySettings.xml" and I found some discussions related to my problem. After a lot of time struggling with it I managed to solve the problem. There are a few steps you need to do, to solve this and I didn’t find these steps all in one place. So in case anyone else has the same problem as mine, I'm giving the complete step by step solution here:

     

    1- Go to the "store" directory of MRDS installation folder. Inside create a XML file named "SecuritySettings.xml". If your using MSRS 1.5 go to:

    http://msdn.microsoft.com/en-us/library/bb870540.aspx

    but if you're using MRDS 2008, write the following exactly inside the "SecuritySettings.xml" file:

     

    <?xml version="1.0"?>

    <SecuritySettings

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"

    xmlns="http://schemas.microsoft.com/robotics/2008/02/security.html">

    <AuthenticationRequired>false</AuthenticationRequired>

    <OnlySignedAssemblies>false</OnlySignedAssemblies>

    <Users />

    </SecuritySettings>

     

    2- Go to the bin directory of MRDS installation folder, locate the following files:

    DssHost.exe.config , DssHost32.exe.config , vpl.exe.config , VplHost32.exe.config

    Inside all of these files, there is a line equal to:

    <add key="Security" value="..\store\SecuritySettings.xml"/>

    this is a relative address to the "store" directory. Strangely this relative address doesn't work and so you have to replace it with the absolute address of the "store" directory which you only need to replace ".." with the address of the installation folder of MRDS; for example: "C:\Program Files\MRDS 2008 Express".

     

    3- Your Done! These steps will effectively disable security. If you need security, now you can edit the "SecuritySettings.xml" file and you'll see your settings taking effect.

     

    If anyone has any comment on this, I'll be glad to here it. Also if anyone knows why the relative address doesn't work I'll be happy to hear about it.

     

    Seyed Mohammad

     
    • Marked as answer by Seyed Mohammad Saturday, December 13, 2008 7:45 AM
    Saturday, December 13, 2008 7:44 AM

All replies

  • Hi,

     

    For problem nr 1 and 2, try to enter the  "yourdomain\yourusername" and "yourpassword".

    Otherwise, turn off security for the services (see: http://msdn.microsoft.com/en-us/library/bb870540.aspx)

     

    For problem nr 3, Robotics studio searches for a lot of files and assumes most of them are in the same directory as the solutions, or a few directories higher.

    Try installing/creating your new service in a sub directory of Robotics Studio.

     

    Erik

     

    Tuesday, December 9, 2008 9:35 AM
  • Hi Erik;

     

    Thanks for the reply.

     

    For problems 1 & 2 the first suggestion was no use but the link about the security settings was useful. Of course the solutions in the web pages didn't work! But after hours of struggling with the thing I figured out that I could disable security by commenting one line of the DssHost config file. Here it is:

     

    Go to the "DssHost32.exe.config" file in the "bin" directory of the installation folder. Locate the following line:

    <add key="Security" value="store\SecuritySettings.xml" />

    then comment it like this:

    <!-- <add key="Security" value="store\SecuritySettings.xml" /> -->

     

    This will disable the security for DssHost. It's not pretty but it works! Of course the only thing that was solved is that now I can run DSS Node but I still can't debug VPL. If you do the same thing with VPL's config file, VPL won't work correct! Do this, then run a simple VPL program and you'll see what I mean! The right way of doing this is to set a new security settings file as the DssHost runtime argument but the method described in this link doesn't work and you'll come up with an error! The error is as follows:

     

    *** Initialization failure: Error reading security settings file.

        <SecuritySettings

        xmlns='http://schemas.microsoft.com/robotics/2006/10/security.html'>

        was not expected.

     

    There are 2 things that bother me:

    1- These are the program's default settings. Why didn't anybody else come up with this problem?!

    2- I searched for the "SecuritySettings.xml" file and there was no match! How is the security configurations being set? Shouldn't there be a File Not Found exception?!

     

    So the summary is that the 1st and 3rd problems still remain. Also the 2nd problem wasn't solved pretty!

     

    Any idea anyone? 

    Tuesday, December 9, 2008 4:38 PM
  • If the SecuritySettings.xml file is missing then DssHost uses default values. This is standard practise for config files.

     

    Are you running under and Administrator account? Most people do, and that changes the scenario.

     

    As Erik says, services should be under the root (or mountpoint) for RDS. The problem with the DSS Command Prompt flashing up and disappearing is because there was an error. If you look in the Project Properties in the Debug tab you should see the command line that is being executed when you try to run the debugger. It simply runs DssHost and specifies a manifest. You can open a DSS Command Prompt youself and type exactly the same command. That way the window will not close and you will get to see what the error message is.

     

    Trevor

     

     

    • Marked as answer by Seyed Mohammad Saturday, December 13, 2008 7:45 AM
    Wednesday, December 10, 2008 2:46 AM
  • Also, edit the VplHost32.exe.config and change the same security config, this is the file used by the VPL engine.

     

    As for why the security is enabled by default, that seems a logical option, otherwise you create a potential security hole!

    (But a nice tool to run and disable it would be nice in case of problems)

     

    and searching for SecuritySettings.xml gives me a lot of responses (and a lot of replies from me on this topic)

     

    Erik

    Wednesday, December 10, 2008 9:02 AM
  • Don't forget that you can look at the security settings using a web browser.

     

    Start DssHost and then browse to:

    http://localhost:50000/security/manager

     

    However, this might be a chicken and the egg problem. If you can't get DssHost to run because of security problems or you can't connect with a browser, then you can't make changes :-(

     

    Trevor

     

     

    Wednesday, December 10, 2008 7:03 PM
  •  

    Hi everyone;

     

    Sorry for the late reply.

    Thanks Trevor. You sure guessed it! There was an error and the problem was the command line arguments in the debug tab of project properties. The error was that the path to the manifest file was incorrect and after that I changed it with the correct value the problem was solved. So the 3rd problem is solved. The inconvenience is that you have to do this for every new project! I can't understand why the default value is set incorrect by Microsoft!

     

    Also I thank Erik for his reply. I didn't see the VplHost32.exe.config file before you told me; but unfortunately disabling the security key in this file didn't solve the problem either. After disabling the security key, VPL came up with an error.

     

    I searched the forum for "SecuritySettings.xml" and I found some discussions related to my problem. After a lot of time struggling with it I managed to solve the problem. There are a few steps you need to do, to solve this and I didn’t find these steps all in one place. So in case anyone else has the same problem as mine, I'm giving the complete step by step solution here:

     

    1- Go to the "store" directory of MRDS installation folder. Inside create a XML file named "SecuritySettings.xml". If your using MSRS 1.5 go to:

    http://msdn.microsoft.com/en-us/library/bb870540.aspx

    but if you're using MRDS 2008, write the following exactly inside the "SecuritySettings.xml" file:

     

    <?xml version="1.0"?>

    <SecuritySettings

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"

    xmlns="http://schemas.microsoft.com/robotics/2008/02/security.html">

    <AuthenticationRequired>false</AuthenticationRequired>

    <OnlySignedAssemblies>false</OnlySignedAssemblies>

    <Users />

    </SecuritySettings>

     

    2- Go to the bin directory of MRDS installation folder, locate the following files:

    DssHost.exe.config , DssHost32.exe.config , vpl.exe.config , VplHost32.exe.config

    Inside all of these files, there is a line equal to:

    <add key="Security" value="..\store\SecuritySettings.xml"/>

    this is a relative address to the "store" directory. Strangely this relative address doesn't work and so you have to replace it with the absolute address of the "store" directory which you only need to replace ".." with the address of the installation folder of MRDS; for example: "C:\Program Files\MRDS 2008 Express".

     

    3- Your Done! These steps will effectively disable security. If you need security, now you can edit the "SecuritySettings.xml" file and you'll see your settings taking effect.

     

    If anyone has any comment on this, I'll be glad to here it. Also if anyone knows why the relative address doesn't work I'll be happy to hear about it.

     

    Seyed Mohammad

     
    • Marked as answer by Seyed Mohammad Saturday, December 13, 2008 7:45 AM
    Saturday, December 13, 2008 7:44 AM
  • Seyed,

    Hi. Got the same problem and i was trying to do what you are suggesting. Only thing is i cannot locate the SecuritySettings.xml in the storre folder for the MRDS 2008. i am using the academic edition. Should i create the file? 
    Monday, December 15, 2008 8:06 AM
  • Hi;

    Yes you must create it. By default the SecuritySettings.xml isn't in the store folder. Fill it up with the content I provided in my latter reply. Of course I found that content in other threads, provided by Erik. (I just said that to respect copy right!)

    Seyed Mohammd

    Monday, December 15, 2008 8:21 AM
  • Seyed,

    I managed to solve it by creating the xml file but i run to vpl problem earlier if i edit the security line in the vpl.exe.config and vplhost32.exe.config. Once i change it to the original setting, its now working nicely. i edited only the dsshost.exe.config and dsshost32.exe.config.

    thank you for all the help. more power
    • Proposed as answer by tsikboy Monday, December 15, 2008 8:44 AM
    Monday, December 15, 2008 8:43 AM
  • Hi tsikboy,

    I got the same situation as yours. To run it, I should only edit the dsshost.exe.config and dsshost32.exe.config. However, I followed all the steps, it still asked for username and passwd. Any idea?

    Thanks in advance!
    Tuesday, June 9, 2009 12:09 AM
  • Hi all,

    I found out the thing is that I edited the dsshost.exe.config and dsshost32.exe.config. I can then run the example code (i.e. speech recognizer gui) without a pop-up window asking login. Everything semms good. But when trying to run using VPL, it continued asking login. And if I edited the vpl.exe.config , VplHost32.exe.config files, VPL showed error and cannot run. Any idea? Thanks!
    Tuesday, June 9, 2009 12:40 AM
  • Hi all,
    I have tried most of the suggestions in this thread, but so far no cigar.  I am trying to use a serial connection to run the simple "ouch" test sample program (in getting started on msrs) on my irobot create.  I have tried (on 2 different xp machines).  I installed the xml file in the store directory and commented out the security line in the above mentioned 4 config files  (thanks Sayed for summarizing it all, that was very helpful).  I can now run the dss node and security appears to be disabled.  But when I try to run a vpl program, vpl says it fails.  A webpage comes up but says it cannot connect with the robot when I set the com port and click connect. 
    I am able to run the icreate.exe program that I found at http://irobotcreate.googlepages.com/create.exesourcecode and it connects to the bot without problem and can control it and read sensors etc. 

    If anyone has any further diagnostic suggestions I would be eternally grateful.
    ;-)

    Tuesday, June 30, 2009 8:10 PM
  • Hi all,

    I found out the thing is that I edited the dsshost.exe.config and dsshost32.exe.config. I can then run the example code (i.e. speech recognizer gui) without a pop-up window asking login. Everything semms good. But when trying to run using VPL, it continued asking login. And if I edited the vpl.exe.config , VplHost32.exe.config files, VPL showed error and cannot run. Any idea? Thanks!

    I have the same problem....  No one has the solution? Idea? Thanks
    Tuesday, December 15, 2009 12:15 PM
  • This solution actually worked for me. I have MRDS R3 and am using Visual Studio 2008.  I had to go into the default install directory to make the following changes:

    I changed dsshost.exe.config and dsshost32.exe.config to include the full path for the location of the SecuritySettings.xml

    C:\Documents and Settings\myname\Microsoft Robotics Dev Studio 2008 R3\store\SecuritySettings.xml

     

    i left vpl.exe.config and vplhost32.exe.config with the relative location.  I was no longer asked for my login...

    Monday, November 8, 2010 12:09 AM