views:

36

answers:

1

Hi,

I have an ASP.NET web project and a membership provider configured via my web.config. Its fully working so no problem there.

We have an older system with a lot of users and I would therefor like to create a class library that can create users in this ASP.NET project but since its a class library it cannot have its own app.config-file.

is it possible to set all this information via code somehow?

<membership defaultProvider="ShidMembershipProvider"> <providers> <clear/> <add name="ShidMembershipProvider" type="SundaHus.AspNet.Membership.ShidMembershipProvider" connectionStringName="ShidConnectionString" enablePasswordRetrieval="true" enablePasswordReset="true" requiersQuestionAndAnswer="true" applicationName="ECB3-development" minRequiredPasswordLength="5"/> </providers> </membership>

+1  A: 

Hey,

You have a custom membership provider it looks like? This connects to your own custom database? You should be able to just point to that database for your code. Or, if you just inherit the functionality from the base class, you can also try overriding the Initialize method, look for the connection string, and change the value to something else.

Brian
Sometimes you regret asking questions. Thanx for the answer anyhow.
Freddy