Question

I am looking to implement Simple Membership authentication for a wildcarded sub-domain application. Users will login to a root site (i.e. www.localhost.com) and be redirected to a psuedo sub-domain site (www.user1.localhost.com). There is only one application on the server.

The following web.config entry for authentication is not working:

<authentication mode="Forms">
  <forms loginUrl="~/Account/SignIn" timeout="2880" domain=".localhost" />
</authentication>

The above entry will not authenticate users into the root site or any of the user specific sites. My local hosts file is configured correctly.

Is this authentication scheme possible with Simple Membership? Am I missing a step?

Was it helpful?

Solution

Whether you are using SMP or the standard membership provider has nothing to do with the FormsAuthentication process and the cookie transmission and decryption.

In addition to setting the domain property to your top level domain make sure that you have configured the same machine keys on both applications.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top