473,320 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to specify a "backup server" for ActiveDirectory Membership Provider

32
Hi,

The question:
Is it possible to have two differents ActiveDirectory Membership Provider in web.config and change at run-time from the default provider to the second provider if the first one fail?


Context:
We are using the ActiveDirectory Membership Provider as part of our authentication solution. It is working great most of the time, but every now and then the AD process on the main server fail.

With Windows this is not a problem as the authentication is done by the domain and whichever of our two AD servers is up process the request.

In the web.config file however, I think that we must specify which server to use :
<add name="ADConnectionString" connectionString="LDAP://server01.sub.corp.domain.com/DC=SUB,DC=CORP,DC=DOMAIN,DC=COM"/>

With this kind of connection string, if the AD process on server01 fails, we are screwed.

I tried to add a second ADMembershipProvider roughly like this in web.config:

<membership defaultProvider="MyADMembershipProvider">
<providers>
<add name="MyADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershi pProvider .... connectionStringName="ADConnectionString01"/>
<add name="MyADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershi pProvider .... connectionStringName="ADConnectionString01"/>
</providers>
</membership>

With that, I thought that I could put the authentication code inside a Try / Catch and if the first provider fail then use the second one but it didn't work. The errors I get when doing this makes me think that the compiler consider one and only one ADMembership provider.


Does anyone know a way I could switch from server01 to server02? Or could I write the connection string without explicitly specifing which server to use (let's say: add name="ADConnectionString" connectionString="LDAP://DC=SUB,DC=CORP,DC=DOMAIN,DC=COM") ?

Thank you very much!!
Jun 8 '09 #1
0 1618

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Martin Eyles | last post by:
Hi, I have a page that contains the following <div runat="server" id="Pikea"> <object runat="server" id="PiTV" style="width:560px; height:560px"...
0
by: martin leer | last post by:
Hi all. I got the following error: OLE DB provider "MSDAORA" for linked server "infonet" returned message "Oracle client and networking components were not found. These components are...
20
by: Wes Groleau | last post by:
I was doing update statements in SQL Server 2000. I have a table with over 16 million rows. It came from several hundred delimited text files, and two of the columns are file ID (int) and Line...
11
by: gunjan.mait | last post by:
hi, i wanted to know the exact use of runat="server" which is being used is ASP.NET why we every time need to use it, even when i want to do the work at client side? How to do simple processings...
3
by: Robertf987 | last post by:
Well, I think I've described what I want to do in the title here. In the database, I have two main tables that contain the main data for the database. One for group expenditures, another for...
3
by: JamesB | last post by:
I have a config screen in my app that updates a dictionary<key,value>. I want to store a copy of this before going into the config screen so if the user wants to cancel all their changes I can...
0
by: Chuck.Dieterle | last post by:
I have a very frustrating problem. I have a situation that works fine on some computers, but not on others. I have SQL Server Express 2005 and Access 2003 loaded on 4 computers. I have set up a...
0
by: johnyjj2 | last post by:
Hello! I'd like to run mssql script (file with extension sql). I installed Microsoft SQL Server 2008 and run in Command Prompt: C:\Documents and Settings\useruser>osql -Usa -Ppassword -i...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.