Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

A Different Login/Membership

$
0
0

Okay, i have been over the forums and havent seen anything like this scenerio i want to describe. i have tried and failed to change the membership that asp.net provides using this scenerio as well. I cant use the built in control for the login and registration i need to use a custom one.

here it goes:

A existing/new person is on an external website that has a link to our login page - say Default.aspx. From the other website it passes a query string that contains a code to tell the asp.net application where they are coming from and what database to use. There are multiplie websites with different query string values that tell the application which database to use (lets say we have 24 databases on the server).

So, WEBSITE A. person clicks the button - "Join Here!" and it passes a string "...default.aspx?code=uuuu" the app reads that code "uuuu" and says okay this person is registering or logining in to this database name "DefaultA"..  So, WEBSITE B. person clicks the button - "Join Here!" and it passes a string "...default.aspx?code=xxxx" the app reads that code "xxxx" and says okay this person is registering or logining in to this database name "DefaultB".

Maybe i am thinking to hard about this one. The webconfig file has all this:

<roleManager enabled="true" defaultProvider="AspNetSqlRoleProviderDefaultB" ><providers><clear/><add connectionStringName="ApplicationServicesDefaultA" applicationName="AppName" name="AspNetSqlRoleProviderDefaultA" type="System.Web.Security.SqlRoleProvider"/><add connectionStringName="ApplicationServicesDefaultB" applicationName="AppName" name="AspNetSqlRoleProviderDefaultB" type="System.Web.Security.SqlRoleProvider"/><add connectionStringName="ApplicationServicesDefaultC" applicationName="AppName" name="AspNetSqlRoleProviderDefaultC" type="System.Web.Security.SqlRoleProvider"/></providers></roleManager><profile defaultProvider="AspNetSqlProfileProviderDefaultB"><providers><clear/><add name="AspNetSqlProfileProviderDefaultA" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServicesDefaultA" applicationName="AppName"/><add name="AspNetSqlProfileProviderDefaultB" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServicesDefaultB" applicationName="AppName"/><add name="AspNetSqlProfileProviderDefaultC" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServicesDefaultC" applicationName="AppName"/></providers></profile><membership defaultProvider="AspNetSqlMembershipProviderDefaultB"><providers><clear/><add name="AspNetSqlMembershipProviderDefaultA" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServicesDefaultA" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="AppName"/><add name="AspNetSqlMembershipProviderDefaultB" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServicesDefaultB" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="AppName"/><add name="AspNetSqlMembershipProviderDefaultC" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServicesDefaultC" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="AppName"/></providers></membership>

...and then the connections...

<connectionStrings><add name="ApplicationServicesDefaultA" connectionString="server=SQLSERVER; MultipleActiveResultSets=True; database=DefaultA; user id=; pwd=;" providerName="System.Data.SqlClient"/><add name="ApplicationServicesDefaultB" connectionString="server=SQLSERVER; MultipleActiveResultSets=True; database=DefaultB; user id=; pwd=;" providerName="System.Data.SqlClient"/><add name="ApplicationServicesDefaultC" connectionString="server=SQLSERVER; MultipleActiveResultSets=True; database=DefaultC; user id=; pwd=;" providerName="System.Data.SqlClient"/></connectionStrings>


I cant use the webconfig like this can I? Can I change the membership depending on who is coming it at runtime? Save it in session and use it throughout the application? Just some other ideas I am throwing out there. Trying to find HOW to do this and the BEST way correctly.

Thanks for any information you can provide me!

Brian 

 

 


 


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>