static string GetRemoteDocument(string address) { string message = ""; rest rc = new rest(); string user = ConfigurationManager.AppSettings["user"].ToString(); string pwd = ConfigurationManager.AppSettings["pwd"].ToString(); byte[] b = rc.getFile(new Uri(address), user, pwd, ref message); if (message.Length > 0) { throw new System.Exception(message); } return(Encoding.UTF8.GetString(b)); }
private static string getrealprofile(int id) { string message = ""; rest rc = new rest(); string user = ConfigurationManager.AppSettings["user"].ToString(); string pwd = ConfigurationManager.AppSettings["pwd"].ToString(); string address = ConfigurationManager.AppSettings["nav2real"].ToString(); address = string.Format("{0}{1}", address, id); byte[] b = rc.getFile(new Uri(address), user, pwd, ref message); if (message.Length > 0) { throw new System.Exception(message); } return(Encoding.UTF8.GetString(b)); }