Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 2nd, 2008, 06:58 AM
Registered User
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADMembershipProvider & Windows 2000 Server

Hi,

I'm having a problem connecting my web application to an Active Directory running on Windows 2000 Server (SP4).

It works fine if I connect to an AD on Windows Server 2003, but if I try to use the AD on Windows 2000 Server I get this error message: Object reference not set to an instance of an object

And shows is red the ActiveDirectoryMembershipProvider section on the web.config.

I think the connection string and credentials are ok, because I used them on a LDAP Browser and succeed to connect to the AD. But on the web application I'm getting this error when I try to login.

If I remove the Membership.ValidateUser method from my login page I can enter in the application.

What could be wrong? The Provider connection? Incompatibility with Windows 2000 Server AD?


[u]Here is the Stack Trace:</u>

System.Web.Configuration.ProvidersHelper.Instantia teProvider(ProviderSettings providerSettings, Type providerType)
em System.Web.Configuration.ProvidersHelper.Instantia teProviders(ProviderSettingsCollection configProviders, ProviderCollection providers, Type providerType)
em System.Web.Security.Membership.Initialize()
em System.Web.Security.Membership.ValidateUser(String username, String password)
em Login.btnLogin_click(Object sender, EventArgs e) em C:\Users\[USER]\Desktop\[AppFolder]\Login.aspx.vb:line 40
em System.Web.UI.WebControls.Button.OnClick(EventArgs e)
em System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
em System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
em System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
em System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
em System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
em System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
em System.Web.UI.Page.ProcessRequest()
em System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context)
em System.Web.UI.Page.ProcessRequest(HttpContext context)
em ASP.login_aspx.ProcessRequest(HttpContext context)
em System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
em System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)


[u]And here is my web.config:</u>

<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="Sql2000Server" connectionString="Server=SQLSERVER\SQLINSTANCE;uid =USER;pwd=PASS;database=SQLDB"/>
<add name="ADConnectionString" connectionString="LDAP://aaa.bbb.ccc.dd.pt:389/DC=bbb,DC=ccc,DC=dd,DC=pt"/>
</connectionStrings>

<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="Login.aspx" defaultUrl="~/requisicao/extracto.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true" cookieless="UseDeviceProfile"/>
</authentication>

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

<membership defaultProvider="AspNetActiveDirectoryMembershipPr ovider">
<providers>
    <remove name="AspNetSqlMembershipProvider"/>
    <add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" applicationName="/" connectionStringName="ADConnectionString" connectionUsername="xxxxx" connectionPassword="*****" connectionProtection ="None" attributeMapUsername="sAMAccountName" />
</providers>
</membership>


I would appreciate any help because I don't know what to do anymore. I've tried so many things with no success :(
Thanks!





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 2.0 & SQL Server 2000 / 2005 Hosting NonStopMark ASP.NET 2.0 Basics 1 January 1st, 2007 02:56 AM
Crystal Report "Login Failed" windows 2000 server HaniShtine Crystal Reports 0 December 7th, 2005 04:00 PM
SQL Server 2000 on Windows XP SP2 -- HELP ASAP reyboy SQL Server 2000 0 August 7th, 2005 02:10 AM
Configure Windows 2000 as a Web Server pans HTML Code Clinic 3 December 7th, 2004 11:39 PM
install php on windows 2000 server (matrix) martinwbialachowski BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 May 6th, 2004 04:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.