Last post Sep 04, 2012 12:13 PM by mlov83
Aug 28, 2012 03:09 PM|mlov83|LINK
Hello guys i have server "A" where i would like to put a link to an application to server "B". Server "A" is a unix machine running java and redhat linux. when user come to server "A" they must first authenticate so that they can get to see the application
in server "A". What i like to do now is leverage server "A"'s authentication and basically allow the user to see the page rendered page on server "B" if and only if he has be authenticated on server A.(server "A" sets a cookie i believe) I would want to make
the page on server B check wheter the user is authenticated and its coming from server "A". If it is then render the page if its not then redirect the user back to server A to authenticate. Server "B" its a windows machine running windows server 8 64bit. Can
someone point me in the right direction This seems possible however im not sure how to accomplish. Thanks in advance.
Aug 28, 2012 04:02 PM|SohailShaikh|LINK
if both server have static ip then check his ip to accepting Request
Aug 28, 2012 05:43 PM|mlov83|LINK
any idea on how to check the ip address? from .net? not the users ip address but the address of the calling server? sorry for the noob question.
Aug 29, 2012 12:29 AM|SohailShaikh|LINK
Private string GetIP()
string strHostName = "";
strHostName = System.Net.Dns.GetHostName();
IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(strHostName);
IPAddress addr = ipEntry.AddressList;
Sep 04, 2012 12:13 PM|mlov83|LINK
The answer to this its not possible there are few script out there that go like this
public string GetIPAddress()
string strHostName = System.Net.Dns.GetHostName();
IPHostEntry ipHostInfo = Dns.Resolve(Dns.GetHostName());
IPAddress ipAddress = ipHostInfo.AddressList;
This returns the ip address of the server your are on but not the server that it actually making a post or a get request to this server. The closest thing that you could get is the best source that i have been able to find is this,
This gives me the hostname of the server making a call.