简体   繁体   中英

Redirect to external URL Post

I will try and keep this as short as possible, although I may be leaving some things out, due to inexperience and/or lack of knowledge.

I have successfully been able to redirect from Website A to Website B, much like what was illustrated in the link C# - HttpWebResponse redirect to external URL (Thank You to everyone involved, this was very helpful)

The only problem is, that in Website B, after the redirection seems to have been successful, the system seems to ignore what happened , and redirect again back to it's Default home controller index Get Action result, and continues to Log in as if the Redirection never took place. I have removed everything that may cause this, in my opinion, like Attributes to check authentication etc.

Any help in this regard will be much appreciated.

According to your reference link( https://stackoverflow.com/questions/27503986/c-sharp-httpwebresponse-redirect-to-external-url ), they try to create a single-sign-on system. Because they have 2 websites. The question of this link that how can they solve this problem with HtppWebRequest class. This is not possible ofcourse.

If you look at the answer section that I added on image, Author offer to use cookie sharing.

在此处输入图片说明

What is the correct solution to share authanctication info between different web site?

You should search about on Single Sing On Authantication methods. Here is a few clue

OAuth(Google, Facebook)

SAML Protocol

JWt

may Jwt a bit hard way ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM