Request.ServerVariables["HTTP_X_FORWARDED_FOR"] get only one ipaddress
C#
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#:
- Title
- webutility.urlencode space
- Category
- C#
- Title
- c# string formatting
- Category
- C#
- Title
- get random number c#
- Category
- C#
- Title
- f string C#
- Category
- C#
- Title
- c# get all inherited classes of a class
- Category
- C#
- Title
- 2D follow ia unity 2D with agrorange
- Category
- C#
- Title
- optional parameter get request c#
- Category
- C#
- Title
- asp.net textarea disable resize
- Category
- C#
- Title
- c# how to initialize an array
- Category
- C#
- Title
- how to update modal class using dbfirst in asp.net core
- Category
- C#
- Title
- traversing an enum c#
- Category
- C#
- Title
- c# how to exit program
- Category
- C#
- Title
- public enum c#
- Category
- C#
- Title
- c# iterate over string
- Category
- C#
- Title
- .net core copy file in folder to root
- Category
- C#
- Title
- make a list c#
- Category
- C#
- Title
- perlin noise unity
- Category
- C#
- Title
- array copy c#
- Category
- C#
- Title
- c# window instantly close
- Category
- C#
- Title
- c# return two variables of different types
- Category
- C#
- Title
- add row count devepxress report
- Category
- C#
- Title
- how to see if they are aholding down a key unity
- Category
- C#
- Title
- navigate to another page with an object uwp c#
- Category
- C#
- Title
- move character unity
- Category
- C#
- Title
- read configuration workerservice
- Category
- C#
- Title
- socket in c#
- Category
- C#
- Title
- c# convert byte to char
- Category
- C#
- Title
- c# list to string
- Category
- C#
- Title
- c# get executable path
- Category
- C#
- Title
- message authorization has been denied for this request. fiddler
- Category
- C#
- Title
- c# random string
- Category
- C#
- Title
- c# read char
- Category
- C#
- Title
- stroke dash array wpf
- Category
- C#
- Title
- find negative version of integer in c#
- Category
- C#
- Title
- string to guid c#
- Category
- C#
- Title
- lat long data type c#
- Category
- C#
- Title
- c# web form compare dates
- Category
- C#
- Title
- c# ^ operator
- Category
- C#
- Title
- unity 2d rotate towards direction
- Category
- C#
- Title
- isprime c#
- Category
- C#
- Title
- edit form item from class C#
- Category
- C#
- Title
- unity calculate path
- Category
- C#
- Title
- unity getcomponent
- Category
- C#
- Title
- c sharp substring
- Category
- C#
- Title
- c# string code ascii
- Category
- C#
- Title
- c# object clone
- Category
- C#
- Title
- c# string to byte array
- Category
- C#
- Title
- c# object to json string
- Category
- C#
- Title
- unity mouse click position
- Category
- C#
- Title
- c# property get set
- Category
- C#
- Title
- wpf get name of clicked element
- Category
- C#
- Title
- or symbol in unity
- Category
- C#
- Title
- convert number of days into months c#
- Category
- C#
- Title
- c# print expression tree
- Category
- C#
- Title
- c# index in select
- Category
- C#
- Title
- unity persistent data
- Category
- C#
- Title
- abstract class c#
- Category
- C#
- Title
- c# split a string and return list
- Category
- C#
- Title
- get absolute url c#
- Category
- C#
- Title
- c# is not equal to
- Category
- C#
- Title
- how to randomly rotate rigidbody of object in unity
- Category
- C#
- Title
- c# adding to a list
- Category
- C#
- Title
- .net core convert keycollection to array
- Category
- C#
- Title
- membership get user id
- Category
- C#
- Title
- two players one phone unity gamne
- Category
- C#
- Title
- variables
- Category
- C#
- Title
- how to display an image url in c# picturebox
- Category
- C#
- Title
- C# enum
- Category
- C#
- Title
- how to reference a transform unity
- Category
- C#
- Title
- kotlin random number
- Category
- C#
- Title
- c# bool list count true
- Category
- C#
- Title
- how to reload app.config file at runtime in c#
- Category
- C#
- Title
- onmouseclick unity
- Category
- C#
- Title
- c# httpclient postasync stringcontent
- Category
- C#
- Title
- asp net mvc 5 return view from another controller
- Category
- C#
- Title
- how to crouch in unity
- Category
- C#
- Title
- collision detector unity c# 2d
- Category
- C#
- Title
- c# enum variable set to nonthing
- Category
- C#
- Title
- c# to vb.net
- Category
- C#
- Title
- c# input integer
- Category
- C#
- Title
- array to list C
- Category
- C#
- Title
- Move player on planets in unity 2d
- Category
- C#
- Title
- grab reference from method parameter c#
- Category
- C#
- Title
- how consider the first caracter in Split c#
- Category
- C#
- Title
- how to make infinite loop in c#
- Category
- C#
- Title
- Int64
- Category
- C#
- Title
- c# reverse a string
- Category
- C#
- Title
- C# foreach loop async but wait at end
- Category
- C#
- Title
- how to add a gameobject
- Category
- C#
- Title
- unity fall damage c#
- Category
- C#
- Title
- C# check many strings quickly
- Category
- C#
- Title
- newtonsoft create dynamic object
- Category
- C#
- Title
- increase variable C#
- Category
- C#
- Title
- c# bitmap to picturebox
- Category
- C#
- Title
- how to create more accurate searching c#
- Category
- C#
- Title
- .sh script: check if file exist
- Category
- C#
- Title
- c# implement a superclass in subclass
- Category
- C#
- Title
- Length = '((System.Net.RequestStream)RequestStream).Length' threw an exception of type 'System.NotSupportedException'
- Category
- C#
- Title
- .net core get image from url
- Category
- C#
- Title
- how to route back to url using Request.Headers["Referer"].ToString() in asp.net core
- Category
- C#