我很同意问同样的问题,但没有一个能解决我的问题。
我在ASP.NET Web Form App 4.5 Framework
中创建了一个门户I have
1. IIS 7.5 on MS Server 2008 R2
-Windows Authentication (All others are disable)
-DefaultAppPool v4.0
2. MS Server 2008 R2 (Saved on active directory)
3. Active Directory
4. Web.Congif file with lines below
- <authentication mode="Windows"/>
- <identity impersonate="false"/>
<authorization>
<deny users="?"/>
</authorization>
5. Clients(Users) are on the same AD.
这是我的情景;当用户在浏览器上输入myServerIP:PortNumber时,我希望用户自动登录我的门户网站而不使用Windows用户名和密码凭证弹出。如果重定向到Default.aspx,我还检查用户名是否为AD,如果没有重定向到NotAllowed.aspx
我们有两个不同的带有IIS 7.5的MS Server 2008 R2。 我们将它们命名为IIS_X和IIS_Y。
我们有一个门户网站,几年前在IIS_X上编码。 IIS_X具有上面写的功能。我公司的用户无需Windows用户名和密码弹出窗口即可访问此门户。所以效果很好。
问题在于: 我发布了我的IIS_X门户网站,它向用户提示窗口弹出一次,我写了我的Windows用户名并通过然后我访问门户网站。 但是当我在IIS_Y上发布我的门户网站时(它具有上面写的功能),它会提示四次。我写了我的名字,我的网站打开了,但它再次提示三次。
我的问题是:如何解决此问题并让用户在没有Windows登录提示的情况下访问我的门户网站。
任何帮助都会得到满足。
这是我的web.config文件。
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<connectionStrings>
</connectionStrings>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="3000000000"/>
</requestFiltering>
</security>
</system.webServer>
<system.web>
<httpRuntime executionTimeout="240" maxRequestLength="29696"/>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.DirectoryServices.AccountManagement, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<authentication mode="Windows"/>
<identity impersonate="false"/>
<authorization>
<deny users="?"/>
</authorization>
<profile defaultProvider="DefaultProfileProvider">
<providers>
<add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/>
</providers>
</profile>
<roleManager defaultProvider="DefaultRoleProvider">
<providers>
<add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/>
</providers>
</roleManager>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" >
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>
</controls>
</pages>
</system.web>
</configuration>