views:

67

answers:

2

I am building a suite of applications using ASP.NET.

  • Each application can be hosted on separate servers.
  • All the applications share an integrated database.
  • All applications require user authentication before use.
  • I want to build the ability to transfer users from one application to another without having to relogin.

Is there a way to recognize that a user is logged in one application and allow quick navigation to another application on a different server?

Currently I am storing the password hashes in the database; but I wouldn't be opposed to other suggestions if they solve the problem.

+1  A: 

you need to check this article

Single sign-on across multiple applications in ASP.NET

Muhammad Akhtar
+1  A: 

Here is what I have done in the past.

Each application must share a forms authentication ticket. To do this the forms authentication cookie name must have the same name, the machineKeys must be the same, and the protection mode must be the same.

This works across domains, but does not work across IPs. What I do to get around this is to serialize the ticket info and store it in the database with the session id as the key. If a user is not authenticated the server will look for the session id in the database and rebuild the FA ticket if found.

PJDev
+1, the technique you've described is explained in the link that Muhammad Akhtar provided. Thanks. The other solution that you could use for different IPs would be to send the user several authenticated cookies for each IP's domain.
Chris
Muhammad's link does not work for me here. To my knowledge you cannot generate a FA ticket from one server to authenticate on another server if you only have an IP. Can you please explain?
PJDev
In the article, it describes how you manually set cookies. I don't see why you couldn't set multiple cookies for each domain (Unless browser security prevents this). In either case, all of my servers will be on the same domain.
Chris