void loadServerVariablesCollection() { HttpWorkerRequest wr = request.WorkerRequest; if (loaded || (wr == null)) { return; } IsReadOnly = false; Add("ALL_HTTP", Fill(wr, true)); Add("ALL_RAW", Fill(wr, false)); Add("APPL_MD_PATH", wr.GetServerVariable("APPL_MD_PATH")); Add("APPL_PHYSICAL_PATH", wr.GetServerVariable("APPL_PHYSICAL_PATH")); if (null != request.Context.User && request.Context.User.Identity.IsAuthenticated) { Add("AUTH_TYPE", request.Context.User.Identity.AuthenticationType); Add("AUTH_USER", request.Context.User.Identity.Name); } else { Add("AUTH_TYPE", ""); Add("AUTH_USER", ""); } Add("AUTH_PASSWORD", wr.GetServerVariable("AUTH_PASSWORD")); Add("LOGON_USER", wr.GetServerVariable("LOGON_USER")); Add("REMOTE_USER", wr.GetServerVariable("REMOTE_USER")); Add("CERT_COOKIE", wr.GetServerVariable("CERT_COOKIE")); Add("CERT_FLAGS", wr.GetServerVariable("CERT_FLAGS")); Add("CERT_ISSUER", wr.GetServerVariable("CERT_ISSUER")); Add("CERT_KEYSIZE", wr.GetServerVariable("CERT_KEYSIZE")); Add("CERT_SECRETKEYSIZE", wr.GetServerVariable("CERT_SECRETKEYSIZE")); Add("CERT_SERIALNUMBER", wr.GetServerVariable("CERT_SERIALNUMBER")); Add("CERT_SERVER_ISSUER", wr.GetServerVariable("CERT_SERVER_ISSUER")); Add("CERT_SERVER_SUBJECT", wr.GetServerVariable("CERT_SERVER_SUBJECT")); Add("CERT_SUBJECT", wr.GetServerVariable("CERT_SUBJECT")); string sTmp = wr.GetKnownRequestHeader(HttpWorkerRequest.HeaderContentLength); if (null != sTmp) { Add("CONTENT_LENGTH", sTmp); } Add("CONTENT_TYPE", request.ContentType); Add("GATEWAY_INTERFACE", wr.GetServerVariable("GATEWAY_INTERFACE")); Add("HTTPS", wr.GetServerVariable("HTTPS")); Add("HTTPS_KEYSIZE", wr.GetServerVariable("HTTPS_KEYSIZE")); Add("HTTPS_SECRETKEYSIZE", wr.GetServerVariable("HTTPS_SECRETKEYSIZE")); Add("HTTPS_SERVER_ISSUER", wr.GetServerVariable("HTTPS_SERVER_ISSUER")); Add("HTTPS_SERVER_SUBJECT", wr.GetServerVariable("HTTPS_SERVER_SUBJECT")); Add("INSTANCE_ID", wr.GetServerVariable("INSTANCE_ID")); Add("INSTANCE_META_PATH", wr.GetServerVariable("INSTANCE_META_PATH")); Add("LOCAL_ADDR", wr.GetLocalAddress()); Add("PATH_INFO", request.PathInfo); Add("PATH_TRANSLATED", request.PhysicalPath); Add("QUERY_STRING", request.QueryStringRaw); Add("REMOTE_ADDR", request.UserHostAddress); Add("REMOTE_HOST", request.UserHostName); Add("REMOTE_PORT", wr.GetRemotePort().ToString()); Add("REQUEST_METHOD", request.HttpMethod); Add("SCRIPT_NAME", request.FilePath); Add("SERVER_NAME", wr.GetServerName()); Add("SERVER_PORT", wr.GetLocalPort().ToString()); if (wr.IsSecure()) { Add("SERVER_PORT_SECURE", "1"); } else { Add("SERVER_PORT_SECURE", "0"); } Add("SERVER_PROTOCOL", wr.GetHttpVersion()); Add("SERVER_SOFTWARE", wr.GetServerVariable("SERVER_SOFTWARE")); Add("URL", request.FilePath); AddHeaderVariables(wr); IsReadOnly = true; loaded = true; }