C
cc
Hi,
I'd like to access the information in a membership provider from
another application. Currently I have an ASP.NET 2.0 application in
which I use SQLMemnershipProvider. Everything works fine within the
ASP.NET and I may use constructs like Membership.GetUser("name") when I
need to access the information in the membership provider. The relevant
part of web.config for this app is below.
Now I'd like to access the information from another non-ASP application
or class library. I'd like to know how to manually initialize the
membership provider so that I can get access to the MemebershipUser
objects within this provider.
Thanks,
cc
---web.config portion of the asp.net app ---
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="MyConnectionString"
enablePasswordRetrieval="false" enablePasswordReset="true"
requiresQuestionAndAnswer="true" applicationName="/"
requiresUniqueEmail="true" passwordFormat="Hashed"
maxInvalidPasswordAttempts="15" minRequiredPasswordLength="3"
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
passwordStrengthRegularExpression=""/>
</providers>
</membership>
I'd like to access the information in a membership provider from
another application. Currently I have an ASP.NET 2.0 application in
which I use SQLMemnershipProvider. Everything works fine within the
ASP.NET and I may use constructs like Membership.GetUser("name") when I
need to access the information in the membership provider. The relevant
part of web.config for this app is below.
Now I'd like to access the information from another non-ASP application
or class library. I'd like to know how to manually initialize the
membership provider so that I can get access to the MemebershipUser
objects within this provider.
Thanks,
cc
---web.config portion of the asp.net app ---
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="MyConnectionString"
enablePasswordRetrieval="false" enablePasswordReset="true"
requiresQuestionAndAnswer="true" applicationName="/"
requiresUniqueEmail="true" passwordFormat="Hashed"
maxInvalidPasswordAttempts="15" minRequiredPasswordLength="3"
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
passwordStrengthRegularExpression=""/>
</providers>
</membership>