views:

19

answers:

3

I'm building a solution where 2 applications are involved. One of them handles the login and user management, and and other provides the service itself.

I need a way to send the user from the first app to the second, along with some data that derives from the whole login process. The data has to be sent in such a way that it can't be tampered with; or a way to check if it's legit has to be available.

Some more details:

  • The solution consists of 2 ASP.NET (Webforms) websites
  • Although both websites are sitting on the same server, a solution that doesn't rely on this is prefered

Thanks in advance.

A: 

You could set an encrypted token cookie in the login application and pick it up in the management application.

I don't know of any way to transfer state data between applications on the server.

David Neale
This doesn't work if each application is in a different domain.
Farinha
+2  A: 

It might not be the best solution.

But this is what immediately comes to my mind.

Serialize the data, (from first website) that you need to pass, into a database accessible from both web sites (can be a third server in worst scenario when your both website might be sitting on different server). Generate a key for the serialized data in the database. It can be a GUID. Pass it on to the other web site. Other website can delete it immediately after retrieving it by using the give key.

Ismail
This looks like the best approach. Thanks!
Farinha
Glad that you liked it.
Ismail
A: 

I am not if it is possible to use Server.transfer to the second site. But this would definitely be tamper-proof since it would occur on the server. The landing page on the second side would then persist the transfered info. Context object would be a good location to store the transfered info.
At a minimum it would recquire both apps to be on the same server.

ggonsalv
Server.Transfer will not work across applications.
David Neale