I have an ASP.NET Website with login page that redirects to default page in case of successful authentication. I have another ASP.NET site under another domain, where I need to place a login form, that will redirect already authenticated user to the default page of the first website. What is the best way of doing this?
Any help will be appreciated..
What you are after is single sign on. The mechanics of the succsesful login redirect are in the web.config
see here http://msdn.microsoft.com/en-us/library/eb0zx8fc.aspx
<configuration>
<system.web>
<authentication mode="Forms" >
<!-- The name, protection, and path attributes must match
exactly in each Web.config file. -->
<forms loginUrl="login.aspx"
name=".ASPXFORMSAUTH"
protection="All"
path="/"
domain="contoso.com"
timeout="30" />
</authentication>
<!-- Validation and decryption keys must exactly match and cannot
be set to "AutoGenerate". The validation and decryption
algorithms must also be the same. -->
<machineKey
validationKey="[your key here]"
decryptionKey="[your key here]"
validation="SHA1" />
Also look here: Asp.net forms authentication and multiple domains
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With