Look in /mapviewernet/serveradminhelper.aspx for an example (exerpt below):
MgServerAdmin serverAdmin = new MgServerAdmin();
serverAdmin.Open("localhost", cred);
string operation = Request.QueryString["OPERATION"];
//Get all information properties
MgPropertyCollection infoProp = serverAdmin.GetInformationProperties();
As for connecting from a desktop app, you will need to copy the webconfig.ini from the www directory and modify the host to point to your server (for when you call MapGuideApi.MgInitializeWebTier ).
I have done this on my machine for local debugging and doesn't seem to cause any issues.