I am placing a JS file to remote server(s). I d like to know where the request is coming from.
ie : i have a js on google.com and upon user click on the link that s produced by js, it triggers some c# code on my server, but i also have the same js on yahoo.com and i d like to be able to know where the request is coming from.
How to find this ?
System.Environment.MachineName
should contain the name of the server.
In ASP.NET, the referring page is given by Request.UrlReferrer
as a Uri object.
This is also available as Request.ServerVariables["HTTP_REFERER"]
as a string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With