After debugging the http traffic and trying many different combinations of IIS, IE, and Web.config settings for Analytics, here are the combinations that will get the Windows Authentication to work properly. The issue was that the Settings link (for the admin page) in the dashboard opens a login message box by default. This did not work well with pure Windows Authentication.
Here is the source code of the Settings link:
<span id="ctl00_DashboardSettingsLinkLabel" class="noprint"><a id="ctl00_SettingsLink" onclick="openModal('LoginModal')" href="BLOCKED SCRIPTvoid(0)">Settings</a></span>
Here are the working combinations:
Web.config: (1) Set both UseSharedMembership and Windows Authentication = "true". SharedMembership is needed to handle the re-authentication by the Settings login message box. (2) Set the authentication mode = "Forms". This is a bit unconventional, but it is necessary to handle the Settings login message box triggered by clicking the Settings link to access the admin page. (3) Set roleManager enabled = "true". This is also related to the re-authentication by the Settings login message box.
<add key="UseSharedMembership" value="true" />
<add key="UseWindowsAuthentication" value="true" />
<authentication mode="Forms">
<forms name=".TERAUTH" loginUrl="Login.aspx" protection="All" timeout="300">
<!-- <credentials passwordFormat="Clear">
<user name="admin" password="admin" />
</credentials> -->
</forms>
</authentication>
<roleManager enabled="true" defaultProvider="SqlRoleProvider">
<providers>
<clear/>
<add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="aspnet_membership"
applicationName="dev"/>
</providers>
</roleManager>
IIS 7.0: Enable Anonymous Authentication, Forms Authentication (this is also to accommodate the Settings login message box), and Windows Authentication.
IE: no special security setting is needed.
Can anyone verify it? Thank you very much!