![]() |
|
|
|||||||
![]() |
ASP Net - HttpContext.Current.Request.UserHostAddress issue |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
hi all
This problem is odd. in a web service, I try to get the client's IP address from the HttpContext object, but it seems to fail to get the proper IP, now in this development environment, we are working on the client site, I don't really have a clear understanding of their network layout, but it is possible that their are using a proxy server to do all Http requset thus the IP in the context is the proxy server IP, any inside? Kevin Kevin Yu |
|
|
|
|
#2 |
|
Posts: n/a
|
yes..very possible/likely...ASP.Net can only show what's available in the
HTTPHeaders....so proxies/routers can certainly effect this and many other fields.. Karl -- MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!) "Kevin Yu" <> wrote in message news:... > hi all > > This problem is odd. in a web service, I try to get the client's IP address > from the HttpContext object, but it seems to fail to get the proper IP, now > in this development environment, we are working on the client site, I don't > really have a clear understanding of their network layout, but it is > possible that their are using a proxy server to do all Http requset thus the > IP in the context is the proxy server IP, any inside? > > > Kevin > > Karl Seguin |
|
|
|
#3 |
|
Posts: n/a
|
what happened is all web app use a sign on portal which authenticate user
then redirect them to the appropriate application and the login portal is hosted on the web farm, I guess that's what cause the problem. I guess there is no way I can get the proper IP in this kind of setup. "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:... > yes..very possible/likely...ASP.Net can only show what's available in the > HTTPHeaders....so proxies/routers can certainly effect this and many other > fields.. > > Karl > > -- > MY ASP.Net tutorials > http://www.openmymind.net/ - New and Improved (yes, the popup is > annoying) > http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to > come!) > "Kevin Yu" <> wrote in message > news:... > > hi all > > > > This problem is odd. in a web service, I try to get the client's IP > address > > from the HttpContext object, but it seems to fail to get the proper IP, > now > > in this development environment, we are working on the client site, I > don't > > really have a clear understanding of their network layout, but it is > > possible that their are using a proxy server to do all Http requset thus > the > > IP in the context is the proxy server IP, any inside? > > > > > > Kevin > > > > > > Kevin Yu |
|
|
|
#4 |
|
Posts: n/a
|
"Kevin Yu" <> wrote in message news:... > > I guess there is no way I can get the proper IP in this kind of setup. > Absolutely not ! This also will make life a little bit harder for hackers. They can still get to the real meat, but it will be harder. John WJ |
|
|
|
#5 |
|
Posts: n/a
|
"WJ" <> wrote in message news:... > > "Kevin Yu" <> wrote in message > news:... > > > > I guess there is no way I can get the proper IP in this kind of setup. > > > > Absolutely not ! This also will make life a little bit harder for hackers. > They can still get to the real meat, but it will be harder. How in .NET? I mean the HttpContext doesn't even contain the source IP (I guess it's the proxy IP) > > John > > Kevin Yu |
|
|
|
#6 |
|
Posts: n/a
|
"Kevin Yu" <> wrote in message news:... > How in .NET? I mean the HttpContext doesn't even contain the source IP (I > guess it's the proxy IP) > Asp.net will return the Proxy IP, not the original IP. If your server exposes directly to outside without middle man then yes, you can see my true IP. Otherwise, the packet is intercepted at the DMZ and all you see is your company agent. I am not a network expert, but I think, they may be able to arrange some kinds of special exception for your application ? You may ask your network technician to see if this can be done. John WJ |
|
|
|
#7 |
|
Posts: n/a
|
WJ wrote:
> > "Kevin Yu" <> wrote in message > news:... > > How in .NET? I mean the HttpContext doesn't even contain the source > > IP (I guess it's the proxy IP) > > > > Asp.net will return the Proxy IP, not the original IP. If your server > exposes directly to outside without middle man then yes, you can see > my true IP. Otherwise, the packet is intercepted at the DMZ and all > you see is your company agent. I am not a network expert, but I > think, they may be able to arrange some kinds of special exception > for your application ? You may ask your network technician to see if > this can be done. Don't forget that proxies may a X-Forwarded-For or similar header contains the original IP. Cheers, -- http://www.joergjooss.de mailto:news- Joerg Jooss |
|
|
|
#8 |
|
Posts: n/a
|
"WJ" <> wrote in message news:... > > "Kevin Yu" <> wrote in message > news:... > > How in .NET? I mean the HttpContext doesn't even contain the source IP (I > > guess it's the proxy IP) > > > > Asp.net will return the Proxy IP, not the original IP. If your server > exposes directly to outside without middle man then yes, you can see my true > IP. Otherwise, the packet is intercepted at the DMZ and all you see is your > company agent. so that's what happen, I checked the network environment documentation. they do have a DMZ setup here. so I guess it's almost impossible to get correct source IP then. it's their security measure, we as developer need to follow the rules/regulations. I am not a network expert, but I think, they may be able to > arrange some kinds of special exception for your application ? You may ask > your network technician to see if this can be done. > I don't think it's up to the network technician to decide that, it's all politic here. > John > > Kevin Yu |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Digital DIGEST - LIVE UPDATE Issue 41 | Ablang | DVD Video | 0 | 01-05-2004 11:54 PM |
| Re: odd motherboard issue | hootnholler | A+ Certification | 0 | 12-19-2003 06:34 AM |
| Digital DIGEST - LIVE UPDATE Issue 40 | Ablang | DVD Video | 0 | 12-15-2003 02:45 PM |
| Digital DIGEST - LIVE UPDATE Issue 39 | Ablang | DVD Video | 0 | 11-29-2003 02:17 AM |
| Digital DIGEST - LIVE UPDATE Issue 38 | Ablang | DVD Video | 0 | 11-09-2003 01:31 AM |