在生产服务器上部署后如何解决身份验证登录混淆? [英] How to solve authentication login mixup after deploying at production server?

查看:55
本文介绍了在生产服务器上部署后如何解决身份验证登录混淆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Windows身份验证方法的项目,以便用户登录Web应用程序.我的服务器正在运行IIS6.无论我使用的是哪台PC,我都将登录到相同的Windows帐户,而不是我的PC用户名.我应该怎么办?这是我已经完成的步骤:

1.创建一个新的应用程序池
2.创建一个新的虚拟目录并创建应用程序
3.将我的Web应用程序定向到应用程序池
4.启用的匿名用户
5.身份冒充设置为true
6.身份验证设置为Windows

web.config代码(完整):

I have a project that is using windows authentication method for user to login to the web application. My server is running IIS6. No matter which pc i am using, i will login to the same windows account instead of my pc username. What should i do? Here are the steps that i had done:

1. Create a new application pool
2. Create a new virtual directory and create the application
3. Direct my web application to the application pool
4. Enabled anonymous user
5. Identity impersonate set to true
6. Authentication set to windows

web.config code (full):

<?xml version="1.0"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->
    <configuration>
        <appSettings>
            <add key="ChartImageHandler" value="storage=file;timeout=20;"/>
    	</appSettings>
        <connectionStrings>
    		<add name="Appraisal_System" connectionString="Data Source=database;Initial Catalog=mytable;User ID=uid; Password=passw"></add>
    	</connectionStrings>
    	<system.web>
      <httpHandlers>
       <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        validate="false" />
      </httpHandlers>
      <pages>
       <controls>
        <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
         assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
       </controls>
      </pages>
      <compilation debug="true" targetFramework="4.0">
    			<assemblies>
    				<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    				<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    				<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    				<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    			</assemblies>
    		</compilation>
    		<httpRuntime enableKernelOutputCache="false"/>
    		<authentication mode="Windows"/>
    		<identity impersonate="true"/>
    		<membership>
    			<providers>
    				<clear/>
    				<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
    			</providers>
    		</membership>
    		<profile>
    			<providers>
    				<clear/>
    				<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
    			</providers>
    		</profile>
    		<roleManager enabled="false">
    			<providers>
    				<clear/>
    				<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
    				<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
    			</providers>
    		</roleManager>
    	</system.web>
    	<system.webServer>
    		<validation validateIntegratedModeConfiguration="false" />
    		<modules runAllManagedModulesForAllRequests="true" />
      <handlers>
       <remove name="ChartImageHandler" />
       <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"
        path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </handlers>
     </system.webServer>
    </configuration>

我尝试过的事情:

-将身份假冒更改为假(但是每次都会出现此安全弹出窗口,而我无法登录)
-更改我的代码以响应写入并找到PC的用户名(均显示启用匿名的e窗口acc)

things that i tried:

- changing the identity impersonate to false (but there''s this security popup everytime and i cannt login)
- changing my code to response write and find the username of the pc (all displays e window acc that anonymous enabled)

推荐答案

在IIS中确保匿名访问"复选框未选中,并且集成Windows身份验证"是唯一选中的复选框.


请点击链接以使您的概念变得清晰..

http://msdn.microsoft.com/en-us/library/ff647405.aspx [ ^ ]
In IIS Make sure the Anonymous access check box is not selected and that Integrated Windows authentication is the only selected check box.


Follow the link to get your concepts clear..

http://msdn.microsoft.com/en-us/library/ff647405.aspx[^]


这篇关于在生产服务器上部署后如何解决身份验证登录混淆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆