Thanks for your reply. I met all the criterias you listed above, but
it still doesn't work.
Hmmm...
I tried using the same settings on IIS 5.0, and it seemed to have
worked. Doesn't seem to work with IIS 6.0.
Any idea why?
I have to confess I'm not a networking specialist... However, Win2k3s comes
with IIS 6 straight out of the box, so when you say it works with IIS 5,
that is presumably on a Windows 2000 server, right...? IIRC, Win2k3s fully
patched has much tighter security features than Win2k, so that might be
something to look at...
Can you please take the code below and copy it exactly into an aspx page,
place that in the app running on your IIS 6 box, run it, and tell me what
the various server variables say?
<%@ Page language="c#" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" >
<head>
<title>Debug for ASP.NET</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />
<meta name="CODE_LANGUAGE" content="C#" />
<meta name="vs_defaultClientScript" content="JavaScript" />
<meta name="vs_targetSchema"
content="
http://schemas.microsoft.com/intellisense/ie5" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<script type="text/javascript">
<!--
function toggleTable(pstrTable)
{
if(document.getElementById("tbl" + pstrTable).style.display =="none")
{
document.getElementById("tbl" + pstrTable).style.display="block";
document.getElementById("cmd" + pstrTable).value="Hide";
}
else
{
document.getElementById("tbl" + pstrTable).style.display="none";
document.getElementById("cmd" + pstrTable).value="Show";
}
}
-->
</script>
</head>
<body>
<form id="frmDefault" runat="server">
<input type="button" id="cmdCurrentIISContext" value="Show"
onclick="toggleTable('CurrentIISContext');" style="width:32pt;" />
<b>Current server context running IIS (Environment)</b>
<table id="tblCurrentIISContext" border="1px" style="display:none;">
<tr>
<td><b>Key</b></td>
<td><b>Value</b></td>
</tr>
<!--
<tr>
<td>System.Security.Principal.WindowsIdentity.GetCurrent().Name</td>
<td><%// = System.Security.Principal.WindowsIdentity.GetCurrent().Name
%></td>
</tr>
-->
<tr>
<td>System.Environment.CurrentDirectory</td>
<td><% = System.Environment.CurrentDirectory.ToString() %></td>
</tr>
<tr>
<td>System.Environment.MachineName</td>
<td><% = System.Environment.MachineName.ToString() %></td>
</tr>
<tr>
<td>System.Environment.OSVersion</td>
<td>
<%
/*
4.00.1381 Windows NT 4.0
4.00.1381 Windows NT 4.0 Service Pack 6a 1999-11-30
5.00.2195 Windows 2000 (Windows NT 5.0)
5.00.2195 Windows 2000 (Windows NT 5.0) Service Pack 4 2003-06-26
5.1.2600 Windows XP (Windows NT 5.1)
5.1.2600.2096 Windows XP (Windows NT 5.1) Service Pack 2 RC1
2004-03-11
5.1.2600.2149 Windows XP (Windows NT 5.1) Service Pack 2 RC2
2004-06-10
5.2.3663 Windows Server 2003 RC1
5.2.3718 Windows Server 2003 RC2
5.2.3790 Windows Server 2003 RTM (Windows NT 5.2) 2003-04
6.0.4051 Windows "Longhorn" Client Preview 1 2003-11-02
6.0.4074 Windows "Longhorn" Client Preview 2 2004-05-04
*/
Response.Write(System.Environment.OSVersion.ToString());
System.OperatingSystem osInfo = System.Environment.OSVersion;
switch(osInfo.Platform) // determine the platform
{
case System.PlatformID.Win32Windows: // Win95, Win98, Win98SE, WinMe
{
switch (osInfo.Version.Minor)
{
case 0:
{
Response.Write(" (Windows 95)");
break;
}
case 10:
{
if(osInfo.Version.Revision.ToString() == "2222A")
{
Response.Write(" (Windows 98 Second Edition)");
}
else
{
Response.Write(" (Windows 98)");
}
break;
}
case 90:
{
Response.Write(" (Windows Me)");
break;
}
}
break;
}
case System.PlatformID.Win32NT: // WinNT Win2k, WinXP, Win2k3,
Longhorn, Vista
{
switch(osInfo.Version.Major)
{
case 3:
{
Response.Write(" (Windows NT 3.51)");
break;
}
case 4:
{
Response.Write(" (Windows NT 4.0)");
break;
}
case 5:
{
switch(osInfo.Version.Minor)
{
case 0:
{
Response.Write(" (Windows 2000)");
break;
}
case 1:
{
Response.Write(" (Windows XP)");
break;
}
case 2:
{
switch(osInfo.Version.Build)
{
case 3663:
{
Response.Write(" (Windows Server 2003 RC1)");
break;
}
case 3718:
{
Response.Write(" (Windows Server 2003 RC2)");
break;
}
case 3790:
{
Response.Write(" (Windows Server 2003)");
break;
}
}
break;
}
}
break;
}
case 6:
{
switch(osInfo.Version.Build)
{
case 4051:
{
Response.Write(" (Windows \"Longhorn\" Client Preview 1)");
break;
}
case 4074:
{
Response.Write(" (Windows \"Longhorn\" Client Preview 2)");
break;
}
}
break;
}
default :
{
Response.Write(" (Unknown)");
break;
}
}
break;
}
}
%>
</td>
</tr>
<tr>
<td>System.Environment.SystemDirectory</td>
<td><% = System.Environment.SystemDirectory.ToString() %></td>
</tr>
<tr>
<td>System.Environment.UserDomainName</td>
<td><% = System.Environment.UserDomainName.ToString() %></td>
</tr>
<tr>
<td>System.Environment.UserName</td>
<td><% = System.Environment.UserName.ToString() %></td>
</tr>
<tr>
<td>System.Environment.Version</td>
<td>
<%
Response.Write(System.Environment.Version.ToString());
switch(System.Environment.Version.ToString())
{
case "1.0.3705.000" :
{
Response.Write(" (.NET 1.0)");
break;
}
case "1.0.3705.209" :
{
Response.Write(" (.NET 1.0 SP1)");
break;
}
case "1.0.3705.288" :
{
Response.Write(" (.NET 1.0 SP2)");
break;
}
case "1.0.3705.6018" :
{
Response.Write(" (.NET 1.0 SP3)");
break;
}
case "1.1.4322.573" :
{
Response.Write(" (.NET 1.1)");
break;
}
case "1.1.4322.2032" : // native
case "1.1.4322.2300" : // included with Win2k3s 32-bit SP1
case "1.1.4322.2359": // included with Win2k3s 32-bit SP2
{
Response.Write(" (.NET 1.1 SP1)");
break;
}
case "2.0.50727.42":
{
Response.Write(" (.NET 2.0)");
break;
}
}
%>
</td>
</tr>
<tr>
<td>System.Environment.WorkingSet</td>
<td><% = (System.Environment.WorkingSet / (1000 *
1024)).ToString("#,###0") + "Mb (" +
System.Environment.WorkingSet.ToString("#,###0") + ")" %></td>
</tr>
</table>
<hr />
<input type="button" id="cmdEnvironment" value="Show"
onclick="toggleTable('Environment');" style="width:32pt;" />
<b>Environment Variables (Environment.GetEnvironmentVariables())</b><br
/>
<table id="tblEnvironment" border="1px" style="display:none;">
<tr>
<td><b>Key</b></td>
<td><b>Value</b></td>
</tr>
<%foreach (DictionaryEntry de in Environment.GetEnvironmentVariables())
{%>
<tr>
<td><%= de.Key %></td>
<td><%= de.Value %></td>
</tr>
<% } %>
</table>
<hr />
<input type="button" id="cmdDNS" value="Show"
onclick="toggleTable('DNS');" style="width:32pt;" />
<b>Dns Object (System.Net.Dns)</b><br />
<table id="tblDNS" border="1px" style="display:none;">
<tr>
<td><b>Method</b></td>
<td><b>Value</b></td>
</tr>
<tr>
<td>.GetHostName()</td>
<td><%= System.Net.Dns.GetHostName() %></td>
</tr>
</table>
<hr />
<input type="button" id="cmdRequest" value="Show"
onclick="toggleTable('Request');" style="width:32pt;" />
<b>Request Object (HttpContext.Current.Request)</b><br />
<table id="tblRequest" border="1px" style="display:none;">
<tr>
<td><b>Method</b></td>
<td><b>Value</b></td>
</tr>
<tr>
<td>.AnonymousID</td>
<td><%= Request.AnonymousID %> </td>
</tr>
<tr>
<td>.ApplicationPath</td>
<td><%= Request.ApplicationPath %> </td>
</tr>
<tr>
<td>.AppRelativeCurrentExecutionFilePath</td>
<td><%= Request.AppRelativeCurrentExecutionFilePath %> </td>
</tr>
<tr>
<td>.CurrentExecutionFilePath</td>
<td><%= Request.CurrentExecutionFilePath %> </td>
</tr>
<tr>
<td>.FilePath</td>
<td><%= Request.FilePath %> </td>
</tr>
<tr>
<td>.IsAuthenticated</td>
<td><%= Request.IsAuthenticated %> </td>
</tr>
<tr>
<td>.IsLocal</td>
<td><%= Request.IsLocal %> </td>
</tr>
<tr>
<td>.IsSecureConnection</td>
<td><%= Request.IsSecureConnection %> </td>
</tr>
<tr>
<td>.Path</td>
<td><%= Request.Path %> </td>
</tr>
<tr>
<td>.PathInfo</td>
<td><%= Request.PathInfo %> </td>
</tr>
<tr>
<td>.PhysicalApplicationPath</td>
<td><%= Request.PhysicalApplicationPath %> </td>
</tr>
<tr>
<td>.PhysicalPath</td>
<td><%= Request.PhysicalPath %> </td>
</tr>
<tr>
<td>.RawUrl</td>
<td><%= Request.RawUrl %> </td>
</tr>
<tr>
<td>.UserAgent</td>
<td><%= Request.UserAgent %> </td>
</tr>
<tr>
<td>.UserHostAddress</td>
<td><%= Request.UserHostAddress %></td>
</tr>
<tr>
<td>.UserHostName</td>
<td><%= Request.UserHostName %></td>
</tr>
</table>
<hr />
<input type="button" id="cmdRequestServerVariables" value="Show"
onclick="toggleTable('RequestServerVariables');" style="width:32pt;" />
<b>Server Variables (HttpContext.Current.Request.ServerVariables)</b><br
/>
<table id="tblRequestServerVariables" border="1px" style="display:none;">
<tr>
<td><b>Key</b></td>
<td><b>Value</b></td>
</tr>
<%foreach (string name in HttpContext.Current.Request.ServerVariables)
{%>
<tr>
<td><%= name %></td>
<td><%= Request.ServerVariables[name] %> </td>
</tr>
<% } %>
</table>
<hr />
<input type="button" id="cmdApplication" value="Show"
onclick="toggleTable('Application');" style="width:32pt;" />
<b>Application Variables (HttpContext.Current.Application)</b><br />
<table id="tblApplication" border="1px" style="display:none;">
<tr>
<td><b>Key</b></td>
<td><b>Value</b></td>
</tr>
<%foreach (string name in HttpContext.Current.Application) {%>
<tr>
<td><%= name %></td>
<td><%= Application[name] %></td>
</tr>
<% } %>
</table>
<hr />
<input type="button" id="cmdSession" value="Show"
onclick="toggleTable('Session');" style="width:32pt;" />
<b>Session Variables (HttpContext.Current.Session)</b> (SessionID =
<%=Session.SessionID%> )<br />
<table id="tblSession" border="1px" style="display:none;">
<tr>
<td><b>Key</b></td>
<td><b>Value</b></td>
</tr>
<%foreach (string name in HttpContext.Current.Session) {%>
<tr>
<td><%= name %></td>
<td><%= Session[name] %></td>
</tr>
<% } %>
</table>
<hr />
<input type="button" id="cmdRequestCookies" value="Show"
onclick="toggleTable('RequestCookies');" style="width:32pt;" />
<b>Cookies (HttpContext.Current.Request.Cookies)</b><br />
<table id="tblRequestCookies" border="1px" style="display:none;">
<tr>
<td><b>Key</b></td>
<td><b>Value</b></td>
</tr>
<%foreach (string name in HttpContext.Current.Request.Cookies) {%>
<tr>
<td><%= name %></td>
<td><%= Request.Cookies[name] %></td>
</tr>
<% } %>
</table>
<hr />
<%
/*
'System.Web.HttpBrowserCapabilities' does not contain a definition for
'GetEnumerator'
*/
%>
<input type="button" id="cmdRequestBrowser" value="Show"
onclick="toggleTable('RequestBrowser');" style="width:32pt;" />
<b>Browser (HttpContext.Current.Request.Browser)</b><br />
<table id="tblRequestBrowser" border="1px" style="display:none;">
<tr>
<td><b>Key</b></td>
<td><b>Value</b></td>
</tr>
<tr>
<td>.ActiveXControls</td>
<td><%= HttpContext.Current.Request.Browser.ActiveXControls %></td>
</tr>
<tr>
<td>.AOL</td>
<td><%= HttpContext.Current.Request.Browser.AOL %></td>
</tr>
<tr>
<td>.BackgroundSounds</td>
<td><%= HttpContext.Current.Request.Browser.BackgroundSounds %></td>
</tr>
<tr>
<td>.Beta</td>
<td><%= HttpContext.Current.Request.Browser.Beta %></td>
</tr>
<tr>
<td>.Browser</td>
<td><%= HttpContext.Current.Request.Browser.Browser %></td>
</tr>
<tr>
<td>.CDF</td>
<td><%= HttpContext.Current.Request.Browser.CDF %></td>
</tr>
<tr>
<td>.ClrVersion</td>
<td><%= HttpContext.Current.Request.Browser.ClrVersion %></td>
</tr>
<tr>
<td>.Cookies</td>
<td><%= HttpContext.Current.Request.Browser.Cookies %></td>
</tr>
<tr>
<td>.Crawler</td>
<td><%= HttpContext.Current.Request.Browser.Crawler %></td>
</tr>
<tr>
<td>.EcmaScriptVersion</td>
<td><%= HttpContext.Current.Request.Browser.EcmaScriptVersion %></td>
</tr>
<tr>
<td>.Frames</td>
<td><%= HttpContext.Current.Request.Browser.Frames %></td>
</tr>
<tr>
<td>.JavaApplets</td>
<td><%= HttpContext.Current.Request.Browser.JavaApplets %></td>
</tr>
<tr>
<td>.JavaScript</td>
<td><%= HttpContext.Current.Request.Browser.EcmaScriptVersion.Major >=
1 %></td>
</tr>
<tr>
<td>.MajorVersion</td>
<td><%= HttpContext.Current.Request.Browser.MajorVersion %></td>
</tr>
<tr>
<td>.MinorVersion</td>
<td><%= HttpContext.Current.Request.Browser.MinorVersion %></td>
</tr>
<tr>
<td>.MSDomVersion</td>
<td><%= HttpContext.Current.Request.Browser.MSDomVersion %></td>
</tr>
<tr>
<td>.Platform</td>
<td><%= HttpContext.Current.Request.Browser.Platform %></td>
</tr>
<tr>
<td>.Tables</td>
<td><%= HttpContext.Current.Request.Browser.Tables %></td>
</tr>
<tr>
<td>.Type</td>
<td><%= HttpContext.Current.Request.Browser.Type %></td>
</tr>
<tr>
<td>.VBScript</td>
<td><%= HttpContext.Current.Request.Browser.VBScript %></td>
</tr>
<tr>
<td>.Version</td>
<td><%= HttpContext.Current.Request.Browser.Version %></td>
</tr>
<tr>
<td>.W3CDomVersion</td>
<td><%= HttpContext.Current.Request.Browser.W3CDomVersion %></td>
</tr>
<tr>
<td>.Win16</td>
<td><%= HttpContext.Current.Request.Browser.Win16 %></td>
</tr>
<tr>
<td>.Win32</td>
<td><%= HttpContext.Current.Request.Browser.Win32 %></td>
</tr>
</table>
<hr />
<input type="button" id="cmdNavigator" value="Show"
onclick="toggleTable('Navigator');" style="width:32pt;" />
<b>Navigator Properties (javascript:navigator)</b><br />
<table id="tblNavigator" border="1px" style="display:none;">
<tr>
<td><b>Property</b></td>
<td><b>Value</b></td>
</tr>
<tr>
<td>appCodeName</td>
<td><script
type="text/javascript">document.write(navigator.appCodeName);</script></td>
</tr>
<tr>
<td>appMinorVersion</td> <!--appMajorVersion doesn't exist, for some
reason!-->
<td><script
type="text/javascript">document.write(navigator.appMinorVersion);</script></td>
</tr>
<tr>
<td>appName</td>
<td><script
type="text/javascript">document.write(navigator.appName);</script></td>
</tr>
<tr>
<td>appVersion</td>
<td><script
type="text/javascript">document.write(navigator.appVersion);</script></td>
</tr>
<tr>
<td>browserLanguage</td>
<td><script
type="text/javascript">document.write(navigator.browserLanguage);</script></td>
</tr>
<tr>
<td>constructor</td>
<td><script
type="text/javascript">document.write(navigator.constructor);</script></td>
</tr>
<tr>
<td>cookieEnabled</td>
<td><script
type="text/javascript">document.write(navigator.cookieEnabled);</script></td>
</tr>
<tr>
<td>cpuClass</td>
<td><script
type="text/javascript">document.write(navigator.cpuClass);</script></td>
</tr>
<tr>
<td>javaEnabled()</td>
<td><script
type="text/javascript">document.write(navigator.javaEnabled());</script></td>
</tr>
<tr>
<td>language</td>
<td><script
type="text/javascript">document.write(navigator.language);</script></td>
</tr>
<tr>
<td>onLine</td>
<td><script
type="text/javascript">document.write(navigator.onLine);</script></td>
</tr>
<tr>
<td>opsProfile</td>
<td><script
type="text/javascript">document.write(navigator.opsProfile);</script></td>
</tr>
<tr>
<td>platform</td>
<td><script
type="text/javascript">document.write(navigator.platform);</script></td>
</tr>
<tr>
<td>securityPolicy</td>
<td><script
type="text/javascript">document.write(navigator.securityPolicy);</script></td>
</tr>
<tr>
<td>systemLanguage</td>
<td><script
type="text/javascript">document.write(navigator.systemLanguage);</script></td>
</tr>
<tr>
<td>taintEnabled()</td>
<td><script
type="text/javascript">document.write(navigator.taintEnabled());</script></td>
</tr>
<tr>
<td>userAgent</td>
<td><script
type="text/javascript">document.write(navigator.userAgent);</script></td>
</tr>
<tr>
<td>userLanguage</td>
<td><script
type="text/javascript">document.write(navigator.userLanguage);</script></td>
</tr>
<tr>
<td>userProfile</td>
<td><script
type="text/javascript">document.write(navigator.userProfile);</script></td>
</tr>
</table>
<hr />
<input type="button" id="cmdScreen" value="Show"
onclick="toggleTable('Screen');" style="width:32pt;" />
<b>Screen Properties (javascript:screen)</b><br />
<table id="tblScreen" border="1px" style="display:none;">
<tr>
<td><b>Property</b></td>
<td><b>Value</b></td>
</tr>
<tr>
<td>availHeight</td>
<td><script
type="text/javascript">document.write(screen.availHeight);</script></td>
</tr>
<tr>
<td>availLeft</td>
<td><script
type="text/javascript">document.write(screen.availLeft);</script></td>
</tr>
<tr>
<td>availTop</td>
<td><script
type="text/javascript">document.write(screen.availTop);</script></td>
</tr>
<tr>
<td>availWidth</td>
<td><script
type="text/javascript">document.write(screen.availWidth);</script></td>
</tr>
<tr>
<td>colorDepth</td>
<td><script
type="text/javascript">document.write(screen.colorDepth);</script></td>
</tr>
<tr>
<td>height</td>
<td><script
type="text/javascript">document.write(screen.height);</script></td>
</tr>
<tr>
<td>pixelDepth</td>
<td><script
type="text/javascript">document.write(screen.pixelDepth);</script></td>
</tr>
<tr>
<td>width</td>
<td><script
type="text/javascript">document.write(screen.width);</script></td>
</tr>
</table>
</form>
</body>
</html>