Request.ServerVariables["HTTP_X_FORWARDED_FOR"] get only one ipaddress
private string GetUserIP()
{
string ipList = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (!string.IsNullOrEmpty(ipList))
{
return ipList.Split(',')[0];
}
return Request.ServerVariables["REMOTE_ADDR"];
}
Also in C#:
- .netstandard distinctby iqueryable
- ping with c#
- c# interview questions
- C# delegate
- draw sphere cast unity with program
- c# udpclient receive buffer size
- ubuntu: how to open the terminal from c#
- c# how to open file explorer
- convert system.byte a string c#
- calculate impact damage + unity
- unity 3d mouse look script
- c# making a folder
- kotlin random number
- iphone
- unity how to get data of play session time in a text file?
- get type of variable c#
- debug.log unity
- C# copy string except for last letter
- c# get last character of string
- c# throw new exception
- c# resize image keep aspect ratio
- wait without pause anything else unity
- microsoft.portable.csharp.targets was not found vs 2019
- is start called after dontdestroyonload