How to use the Profile other than default

P

Peter Afonin

Hello,

I'm making another attempt to find out how to use a different profile in the
web application. I though it would be quite simple. but couldn't find an
answer anywhere.

All I need to know is how to call "i90ProfileProvider" instead of default
"i90PartnerProfileProvider" in C# or VB.

<profile defaultProvider="i90PartnerProfileProvider">
<providers>
<clear/>
<add name="i90PartnerProfileProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="i90Partner"/>
<add name="i90ProfileProvider"
type="System.Web.Profile.SqlProfileProvider" connectionStringName="i90"/>

</providers>

There must be the way to do this. For user it works just fine:

MembershipUser user=
Membership.Providers["providername"].GetUser("username",false);

If there is a way to add a name for Profile Provider in web.config, then
there must be a way to use it.

Or I should do something entirely different to retrieve the user profile
form another database?

I would appreciate your help very much.

Thank you.
 

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,707
Messages
2,569,344
Members
44,635
Latest member
Matt231

Latest Threads

Top