4

I have an ASP.Net 4.0 application, and within it is a folder called "Forum", setup as a sub application in IIS 7. This forum package implements a custom provider for .net membership. The forum is running in .net 3.5. I'd like to setup the main site so that when users login, it logs them into both my site and the forum site. Both the main site and the forum have separate .Net membership tables.

How can I specify which provider to use with formsauthentication?

right now I have

FormsAuthentication.SetAuthCookie(...); 

this, however, just uses my default provider and does nothing with the provider for the forum

I tried setting the forum app and my web app to have the same cookie name, as well as setting the machinekey on each:

<machineKey validationKey="AutoGenerate" validation="SHA1" /> 

no dice. I googled and didnt really come up with any example of how to use multiple providers like I want to. I updated my web.config to have both provideers but this is useless if I cannot specify in my code which one to use.

1 Answer 1

1

How to Change Membership provider during runtime

Multiple membership/role providers

Sign up to request clarification or add additional context in comments.

1 Comment

Ok, so that allows me to change provider, but what I need to do is login a user using another provider. MembershipProvider doesn't have such a function. Thats part of FormsAuthentication.... In my MVC app, the default example uses a FormsService... but I dont see how to relate the FormsService with the Provider

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.