Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Go Back  Xtreme Visual Basic Talk > > > Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)


Reply
 
Thread Tools Display Modes
  #1  
Old 12-11-2011, 04:24 PM
Schravendeel Schravendeel is offline
Newcomer
 
Join Date: Apr 2010
Posts: 19
Default Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)


Hello Everyone!

I run a server for a project of mine. The clients invoke an Update check function running as a webservice at start-up. These requests are logged to file.

I use the following function to log to file:

Code:
Public Sub Log(ByVal Message As String, ByVal Level As LogEntryLevel, ByVal Additional As Boolean)
   Dim base As String = "C:\SERVER\log\"
   Dim fileName As String = Date.Now.ToString("dd-MM-yyyy") & ".log"
   Dim newString As String = ""
   If Not Additional Then
      If System.IO.File.Exists(base + fileName) Then newString &= vbNewLine
      newString &= Date.Now.ToString("[dd/MM/yyyy HH:mm:ss.fff ") & Level.ToString & "] " & Message
   Else
      newString &= Message
   End If
   My.Computer.FileSystem.WriteAllText(base + fileName, newString, True)
End Sub
I use the following function to get the clients IP-address:

Code:
Public Function getIP() As String
   Dim ip As String
   ip = Context.Request.ServerVariables("HTTP_X_FORWARDED_FOR")
   If ip = String.Empty Then
      ip = Context.Request.ServerVariables("REMOTE_ADDR")
   End If
   Return ip
End Function
The log message is constructed as follows:

Code:
Log(String.Format("Client {0} invoked CheckForUpdate with [{1}]", getIP, ver), LogEntryLevel.INFO, False)
Today this got logged:

Code:
[11-12-2011 22:10:20.730 INFO] Client 10.0.1.4, 127.0.0.1 invoked CheckForUpdate with [0.5]
How can this be returned? Is this normal? Is this possible? How can the request have originated from localhost (127.0.0.1) and at the same time from a remote IP-address? Was the server hacked? Is this a glitch? Can someone please explain this to me?
__________________
“The neat thing about Objective C is that instead of f*cking up an object, you can send it a message, preferably via a delegate, to go f*ck itself, and it will. F*ck itself. More often than you think.”
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET) Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
 
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
Strange result from GetIP("HTTP_X_FORWARDED_FOR") in WebService (ASP.NET)
 
-->