Example #1
0
        IntPtr IApplicationHost.GetConfigToken()
        {
            if (null != _functions)
            {
                return(_functions.GetConfigToken(_appId));
            }
            IntPtr token = IntPtr.Zero;

            String        username;
            String        password;
            IServerConfig serverConfig = ServerConfig.GetDefaultDomainInstance(_iisVersion);
            bool          hasUncUser   = serverConfig.GetUncUser(this, _virtualPath, out username, out password);

            if (hasUncUser)
            {
                try {
                    String error;
                    token = IdentitySection.CreateUserToken(username, password, out error);
                }
                catch {
                }
            }

            return(token);
        }
Example #2
0
        IntPtr IApplicationHost.GetConfigToken()
        {
            string str;
            string str2;

            if (this._functions != null)
            {
                return(this._functions.GetConfigToken(this._appId));
            }
            IntPtr zero = IntPtr.Zero;

            if (ServerConfig.GetDefaultDomainInstance(this._iisVersion).GetUncUser(this, this._virtualPath, out str, out str2))
            {
                try
                {
                    string str3;
                    zero = IdentitySection.CreateUserToken(str, str2, out str3);
                }
                catch
                {
                }
            }
            return(zero);
        }