Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get user IP on intranet
Message
 
 
À
08/07/2014 10:47:15
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01603311
Message ID:
01603409
Vues:
57
>>I need to start "tracking" who is doing what in my ASP.NET application (used in Anonymous mode). So I need to get the user IP that loads the application (on Intranet; not Internet). Google search gives many, many approaches. Can someone recommend an approach of getting the IP that worked for you?
>
>I have some related methods:
>
>
>cIP = oRequest.ServerVariables("REMOTE_ADDR")
>
>    ' Return the computer name
>    Public Function GetComputerName() As String
>        Dim lcComputerName As String = ""
>
>        ' Initialization
>        lcComputerName = System.Environment.MachineName
>
>        Return lcComputerName
>    End Function
>
>
>Note that based on the OS, you might end up with something like ::1 for the IP address when you are running a local Web site.

As you correctly indicated, I am getting "::1" for IP when running on my local Web Site. Do I understand that when I deploy the app to the customer web site (and they will hit it not from local web site), I will see valid IPs?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform