<%@ LANGUAGE=VBScript %> <% Option Explicit %> <% Response.Expires = 0 %> <% ' strings for localization Const L_ACCESSDENIED_TEXT="Unauthorized - Logon failed" Const L_ISM_TEXT="Microsoft Internet Service Manager" Const L_JSCRIPTVER_TEXT="IIS Web administration requires JScript version 3.0 or greater. You can download the lastest javascript files from http://www.microsoft.com/jscript" On Error Resume Next Dim currentobj, adminobj Dim adminserver, lasterr, cont, logonfailure, thisinst ' check for our session vars... if they are missing we need to regrab from the cookies... %> <% if Session("Browser") = "" or Session("FONTSIZE") = "" then %> <% Response.write ("") %> <% else %> <% Set currentobj=GetObject("IIS://localhost/w3svc/"+Request.ServerVariables("INSTANCE_ID")) lasterr = err if err = &H800401E4 then Response.Status = "401 access denied" cont = False logonfailure = True else if err=0 then cont=True else cont=False logonfailure = False end if end if %> <% if cont then %> <% Set adminobj=GetObject("IIS://localhost/w3svc/info") if (Request.ServerVariables("INSTANCE_ID")=adminobj.AdminServer) then Session("isAdmin")=true else Session("isAdmin")=false end if %> <%= L_ISM_TEXT %> <% if Session("Browser") = "IE3" then %> <% else %> <% end if %> <% else %> <% if not logonfailure then %> Unable to connect to the Active Directory Service Object. Please contact your system adminstrator.

Error: <%= err %> <%= err.description %> <% end if %> <% end if %> <% end if %>