1

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.

Kwaaigone
  • 13
  • 3
  • a) Redirecting POST requests is not reliable. b) It would be awesome if you could provide a [mcve]. – mjwills Jul 19 '18 at 08:08

1 Answers1

0

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.

enter image description here

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 ;)

Eyup Can ARSLAN
  • 692
  • 9
  • 25