Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i SET a serverVariables in .NET

is it possible to assign a value to a ServerVariable("Something") using the code? instead of doing it via the IIS?

something as simple as this?

Request.ServerVariables("LOGON_USER")="test"

i also found the following at another forum:

Request.ServerVaria bles.Add(name, value)

but i keep getting the same error on both: "Declaration Expected"

some background:

i am trying to do is pass in the ("LOGON_USER") variable from one applicaton to another (on a different domain), to somehow allow for single sign on. I now pass hidden variables to the new server and then want to assign them to proper servervariables. would I then need to edit response or request? am i waaay off on this?

like image 506
Madam Zu Zu Avatar asked Oct 26 '25 02:10

Madam Zu Zu


1 Answers

Single sign-on is not usually implemented in this manner. Typically you would authenticate the user in the first system, create a secure token, then pass the token along with some identifying information to the second system. The second system would validate the token and the additional data, and if successful, authenticate the user in the second system (usually by creating an auth cookie).

This link gives you an overview of one approach, but you can Google for other techniques: http://msdn.microsoft.com/en-us/library/ms972971.aspx

like image 174
mgnoonan Avatar answered Oct 28 '25 18:10

mgnoonan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!