none
Autenticação de usuário Com Active Directory RRS feed

  • Pergunta

  • Boa tarde

    Estou tentando fazer autenticação de usuário com AD, segui passo a passo o exemplo obtido neste link: http://www.microsoft.com/brasil/msdn/Tecnologias/Seguranca/Associacao.mspx

    e esta dando o seguinte erro:

    Erro de Servidor no Aplicativo '/Custo2005'.

    Erro de configuração

    Descrição: Erro durante o processamento de um arquivo de configuração necessário para o serviço desta solicitação. Examine os detalhes específicos do erro e modifique esse arquivo de configuração apropriadamente.

    Mensagem de Erro do Analisador: Falha de logon: nome de usuário desconhecido ou senha incorreta.


    Erro de Origem:

    Linha 40:       <providers>
    Linha 41:       		<add name="MembershipADProvider" 
    Linha 42:                type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Linha 43:                connectionStringName="ADConnectionString" 
    Linha 44:                connectionUsername="cclad\pedro.andrade" 

    Arquivo de Origem: C:\Inetpub\wwwroot\Custo2005\web.config    Linha: 42


    Informações sobre a Versão: Microsoft .NET Framework Versão:2.0.50727.42; Versão do ASP.NET:2.0.50727.42

     

    Por favor alguem pode me ajudar, estou a alguns dias tentando resolver esseproblema. Já li alguns artigos a respeito, mas ainda não encontrei solução.

     

    terça-feira, 5 de junho de 2007 18:43

Respostas

  • Nei,

     

    1) Verifique se o usuário pedro.andrade está lockando no AD.

    2) Verifique se o usuário pedro.andrade está com direitos de acessos no AD (grupos).

     

    []'s

     

    Weber Ress

    quarta-feira, 6 de junho de 2007 19:07

Todas as Respostas

  • Oi !

     

    1) A password está definida corretamente ?

     

    2) A ADConnectionString está definida corretamente ?

     

    []'s

     

     

    terça-feira, 5 de junho de 2007 23:03
  • Bom Dia Dennes

    veja como está o meu web.config

    <?xml version="1.0"?>

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

    <configSections>

    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

    <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>

    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

    </sectionGroup>

    </sectionGroup>

    </sectionGroup>

    </configSections>

     

    <connectionStrings>

    <add name="ADConnectionString" connectionString="LDAP://cclad.ccl.com.br:389/CN=Users,DC=cclad,DC=ccl,DC=com,DC=br"/>

    </connectionStrings>

     

    <system.web>

    <identity impersonate="false"/>

    <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>

    <authentication mode="Forms">

     

    <forms loginUrl="Usuario/Usuario.aspx"

    protection="All"

    timeout="30"

    name="AppNameCookie"

    path="/FormsAuth"

    requireSSL="false"

    slidingExpiration="true"

    defaultUrl="Inicial.aspx"

    cookieless="UseCookies"

    domain=""

    enableCrossAppRedirects="false">

    <credentials passwordFormat="SHA1"/>

    </forms>

     

    </authentication>

    <authorization>

    <deny users="?"></deny>

    <allow users="*"></allow>

    </authorization>

     

    <membership defaultProvider="MembershipADProvider">

    <providers>

    <add name="MembershipADProvider"

    type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    connectionStringName="ADConnectionString"

    connectionUsername="cclad\XXXX.XXXX"

    connectionPassword="XXXX"

    attributeMapUsername="sAMAccountName"

    connectionProtection="None"/>

    </providers>

    </membership>

     

    <pages>

    <controls>

    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </controls>

    </pages>

    <compilation debug="true">

    <assemblies>

    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    <add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>

    </compilation>

    <httpHandlers>

    <remove verb="*" path="*.asmx"/>

    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

    </httpHandlers>

    <httpModules>

    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </httpModules>

    </system.web>

    <system.webServer>

    <validation validateIntegratedModeConfiguration="false"/>

    <modules>

    <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </modules>

    <handlers>

    <remove name="WebServiceHandlerFactory-Integrated"/>

    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </handlers>

    </system.webServer>

    </configuration>

    quarta-feira, 6 de junho de 2007 12:48
  • Nei,

     

    1) Verifique se o usuário pedro.andrade está lockando no AD.

    2) Verifique se o usuário pedro.andrade está com direitos de acessos no AD (grupos).

     

    []'s

     

    Weber Ress

    quarta-feira, 6 de junho de 2007 19:07
  •  

    Nei, boa tarde

    Também estou com problemas para autenticar com o AD, caso tenha conseguido e puder compartilhar eu agradeço.

     

    Abraços

     

    Jean

    terça-feira, 16 de outubro de 2007 16:35