locked
How to authenticate through two domains? RRS feed

  • Question

  • User1005758432 posted

    I'm using the Login control with the LDAP and ActiveMemberProvider to authenticate my users. But here's what I'm trying to do. If the user recieves a loginError when login to the mySite.myCompany.com domain then it tries to authenticate through the myCompany.com domain. How can this be done? Here's what my current web.config look like:

    1    <?xml version="1.0"?>
    2    <configuration>
    3    	<configSections>
    4    		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    5    			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    6    				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    7    				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    8    					<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
    9    					<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    10   					<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    11   				</sectionGroup>
    12   			</sectionGroup>
    13   		</sectionGroup>
    14   	</configSections>
    15   	<appSettings/>
    16   	<connectionStrings>
    17   		<add name="mySiteConnString" connectionString="LDAP://mySite.myCompany.com/DC=mySite,DC=myCompany,DC=com"/>
    18   		<add name="myCompanyConnString" connectionString="LDAP://myCompany.com/DC=myCompany,DC=com"/>
    19   	</connectionStrings>
    20   	<system.web>
    21   
    22   		<compilation debug="true" strict="false" explicit="true">
    23   			<assemblies>
    24   				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    25   				<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>				
    26   				<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    27   				<add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    28   				<add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    29   				<add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    30   				<add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    31   				<add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    32   				<add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    33   				<add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    34   				<add assembly="System.DirectoryServices.Protocols, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    35   				<add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    36   				<add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    37   				<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    38   				<add assembly="System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    39   				<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>
    40   		</compilation>
    41   		<httpHandlers>
    42   			<remove verb="*" path="*.asmx"/>
    43   			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    44   			<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"/>
    45   			<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"/>
    46   		</httpHandlers>
    47   		<httpModules>
    48   			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    49   		</httpModules>
    50   		<pages>
    51   			<namespaces>
    52   				<clear/>
    53   				<add namespace="System"/>
    54   				<add namespace="System.Collections"/>
    55   				<add namespace="System.Collections.Specialized"/>
    56   				<add namespace="System.Configuration"/>
    57   				<add namespace="System.Text"/>
    58   				<add namespace="System.Text.RegularExpressions"/>
    59   				<add namespace="System.Web"/>
    60   				<add namespace="System.Web.Caching"/>
    61   				<add namespace="System.Web.SessionState"/>
    62   				<add namespace="System.Web.Security"/>
    63   				<add namespace="System.Web.Profile"/>
    64   				<add namespace="System.Web.UI"/>
    65   				<add namespace="System.Web.UI.WebControls"/>
    66   				<add namespace="System.Web.UI.WebControls.WebParts"/>
    67   				<add namespace="System.Web.UI.HtmlControls"/>
    68   			</namespaces>
    69   			<controls>
    70   				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    71   				<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
    72   			</controls>
    73   		</pages>
    74   		
    75   		<authentication mode="Forms">
    76   			<forms name="RSADAuthCookie" timeout="60" loginUrl="login.aspx"/>
    77   		</authentication>
    78   		<membership defaultProvider="RCADMembershipProvider">
    79   			<providers>
    80   				<add name="mySiteADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="mySiteConnString" attributeMapUsername="sAMAccountName"/>
    81   				<add name="myCompanyADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="myCompanyConnString" attributeMapUsername="sAMAccountName"/>
    82   			</providers>
    83   		</membership>
    84   		
    85   		<authorization>
    86   			<!--<deny users="?"/>-->
    87   			<allow users="*"/>
    88   		</authorization>
    89   		<customErrors mode="Off"/>
    90   		
    91   	</system.web>
    92   	<location path="profileUpdate.aspx">
    93   		<system.web>
    94   			<authorization>
    95   				<allow users="enewsletter"/>
    96   				<deny users="?"/>
    97   			</authorization>
    98   		</system.web>
    99   	</location>
    100  	<location path="resumePost.aspx">
    101  		<system.web>
    102  			<authorization>
    103  				<allow users="enewsletter"/>
    104  				<deny users="?"/>
    105  			</authorization>
    106  		</system.web>
    107  	</location>
    108  	<system.web.extensions>
    109  		<scripting>
    110  			<webServices>
    111  			</webServices>
    112  			
    113  		</scripting>
    114  	</system.web.extensions>
    115  	<system.webServer>
    116  		<validation validateIntegratedModeConfiguration="false"/>
    117  		<modules>
    118  			<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    119  		</modules>
    120  		<handlers>
    121  			<remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
    122  			<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"/>
    123  			<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"/>
    124  			<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"/>
    125  		</handlers>
    126  	</system.webServer>
    127  </configuration>
    128  
    

     

    Any help is much appreciated.

    Friday, March 23, 2007 11:10 AM

All replies

  • User1005758432 posted
    A little help here please. I still needed. Thanks so much.
    Tuesday, March 27, 2007 2:25 PM