views:

86

answers:

1

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.

A: 

How to Change Membership provider during runtime

Multiple membership/role providers

rick schott
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
Chris Klepeis