Help! for PC SDK

Hey, guys, can anybody help me to deal with the following problems?

I am using PC SDK to develop a windows applcation. I created a robot system of 5.06.0095 by RS online. I used VC test to open this robot system and also used RS online to connect it. I set the UAS grant to Full Access for default user!

After that, I ran my app. The code piece are listed, but in debug window, the count of UAS is 0, thus, no grant is given to robot system!

What may be the cause of this problem? Any suggestions or solutions are wellcomed, thanks!

code piece below:

@static = new Controller( ControllerFactory.FormatControllerId( new Guid( "12B3A1F5-A992-4FF2-9FAE-C8666B64943C" ) ) );

Grant[] allgrant = @static.AuthenticationSystem.GetCurrentGrants();
Debug.WriteLine(@static.s.ToString());
Debug.WriteLine(allgrant.Length.ToString());
foreach(Grant g in allgrant)
{
  Debug.WriteLine(g.ToString());
}    

I think the reason is that the ControllerFactory is only returning a string when you ask for a FormatControllerId and not a Controller object. My suggestion is to use:

Controller controller = ControllerFactory.CreateFrom(new Guid( “12B3A1F5-A992-4FF2-9FAE-C8666B64943C” ), ControllerFactoryProperty.SystemId);

UserAuthorizationSystem uas = controller.AuthenticationSystem;

Grant grants = uas.GetCurrentGrants();

foreach(Grant grant in grants)

{

System.Diagnostics.Debug.WriteLine(grant.Name);

}

My result is (using NetworkScanner, not Guid):

UAS_BACKUP

UAS_CALIBRATE

UAS_CFG_WRITE

UAS_CONTROLLER_PROPERTIES_WRITE

etc, etc…