开发者

Redirect to a different web application with associated data

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 wi开发者_如何学JAVAth 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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜