Argentini.Halide.H3Secure.Impersonate C# (CSharp) Метод

Impersonate() публичный статический Метод

Begins impersonation of an authenticated user on the server, so your page will have non-anonymous permissions (e.g. to write files, etc.).
public static Impersonate ( ) : System.Boolean
Результат System.Boolean
        public static Boolean Impersonate()
        {
            String domain = string.Empty;
            String userName = string.Empty;
            String password = string.Empty;
            String splitter = @"\";

            String full = H3Config.GetKeyAsString("ImpersonationIdentity", "", "Argentini.Halide");

            Int32 s1 = full.IndexOf(splitter);
            Int32 s2 = full.IndexOf("/");

            if (s1 > 0 && s2 > 0)
            {
                if (s2 < s1)
                {
                    splitter = "/";
                }
            }

            else
            {
                if (s2 > 0)
                {
                    splitter = "/";
                }
            }

            // Access the <appSettings> value
            String[] userAndpassword = full.Split(';');

            // Parse out the domain, username and password
            domain = userAndpassword[0].Substring(0, userAndpassword[0].IndexOf(splitter));
            userName = userAndpassword[0].Substring(userAndpassword[0].IndexOf(splitter) + 1);
            password = userAndpassword[1];

            return Impersonate(domain, userName, password);
        }

Same methods

H3Secure::Impersonate ( String domain, String userName, String password ) : System.Boolean