Complicated Custom Authentication/Authorization scheme question, Please HELP!

A

Allawy

Hi,

I am writing a web application that needs to authenticate and
authorize users against an existing database of users, groups, and
permissions.
The difference between this and other typical applications is that the
SQL data store is not known at development or configuration time, i.e.
the user is presented with a list of sites he/she can sign on to, and
based on the selected application, the server name, database name, and
SQL login info is set. The list and its associated info is derived
from an XML file stored within a virtual directory.
I have already written a custom MembershipProvider that has a method:
ConnectToStore(Server As String, DBName As String, UserID As String,
Password As String)
which I call from the Login.Authenticate event handler on the login
page. This works great as it successfully authenticates the users as
expected.
My challenge is to implement the RoleProvider so that it uses a
similar scheme, i.e. I can set the connection string for the roles
data store before it attempts to connect to the database to get the
roles. It is not clear to me where I should call its version of the
ConnectToStore() method. I have already written and tested a version
of the provider with hard-coded values for testing, and it works. I
now need to plug it into the data store...

So how can I set the connection string for the RoleProvider module
before it kicks in? Any other suggestions as to how best to implement
this functionality?
NOTE: I must continue to use the XML file that contains the list of
applications and their connection info, i.e. I cannot store the
connectin strings in the web.config file.

Thanks in advance
Ali M.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top