473,394 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

ASP and Router

I used to be able to change the page presented to the client with this code:

<% If Request.ServerVariables("HTTP_HOST") =
Request.ServerVariables("LOCAL_ADDR") Then %>

But now that the site is behind a Router this doesn't work anymore. Because
when Request.ServerVariables("HTTP_HOST") is an IP Address (which is what I
was trying to catch) the Request.ServerVariables("LOCAL_ADDR") is now the
assigned IP Address from the Router and so the test is no longer valid.
Ugh!. Any other way to use ASP to achieve in some some other way what I was
trying to accomplish here? Namely accessing the site by IP Address satisfies
the initial condition? Thanks.

--

George Hester
_________________________________

Apr 7 '06 #1
2 1747

"George Hester" <he********@hotmail.com> wrote in message
news:eP**************@TK2MSFTNGP02.phx.gbl...
I used to be able to change the page presented to the client with this code:
<% If Request.ServerVariables("HTTP_HOST") =
Request.ServerVariables("LOCAL_ADDR") Then %>

But now that the site is behind a Router this doesn't work anymore. Because when Request.ServerVariables("HTTP_HOST") is an IP Address (which is what I was trying to catch) the Request.ServerVariables("LOCAL_ADDR") is now the
assigned IP Address from the Router and so the test is no longer valid.
Ugh!. Any other way to use ASP to achieve in some some other way what I was trying to accomplish here? Namely accessing the site by IP Address satisfies the initial condition? Thanks.

--

George Hester
_________________________________


Isn't the fact that HTTP_HOST is numerical enough?
Test it with the RegExp "[^0-9.:]"

Anthony.
Apr 7 '06 #2
thank you Anthony that's right just never used RegExp before. Well I will
now. Again thanks.

--

George Hester
_________________________________
"Anthony Jones" <An*@yadayadayada.com> wrote in message
news:Om**************@TK2MSFTNGP03.phx.gbl...

"George Hester" <he********@hotmail.com> wrote in message
news:eP**************@TK2MSFTNGP02.phx.gbl...
I used to be able to change the page presented to the client with this code:

<% If Request.ServerVariables("HTTP_HOST") =
Request.ServerVariables("LOCAL_ADDR") Then %>

But now that the site is behind a Router this doesn't work anymore.

Because
when Request.ServerVariables("HTTP_HOST") is an IP Address (which is what I
was trying to catch) the Request.ServerVariables("LOCAL_ADDR") is now

the assigned IP Address from the Router and so the test is no longer valid.
Ugh!. Any other way to use ASP to achieve in some some other way what I

was
trying to accomplish here? Namely accessing the site by IP Address

satisfies
the initial condition? Thanks.

--

George Hester
_________________________________


Isn't the fact that HTTP_HOST is numerical enough?
Test it with the RegExp "[^0-9.:]"

Anthony.


Apr 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: John J. Hughes II | last post by:
My code starts a TCP/IP socket listener and waits for incoming connections. This works fine on my system and my test system but I have a customer who say it does not work on their system. As far...
2
by: cyshao | last post by:
How to reset Router by programing? For some resean, we need usually reset our Router. Now, we have to Reset Router manually(shot down and reopen). Are there any method to control and reset...
3
by: steve | last post by:
anyone know how to get a network router's external ip address? any examples w/b great! tia, steve
0
by: John | last post by:
Today something weird happened: I bought myself a new wireless router for home, got it set up, and everything was great. Browsing, email, even Shareaza p2p. Until I tried to use the ASP.NET 2...
0
by: mario.lat_ | last post by:
Hallo to all, I have write a little script for connecting to cisco router BUT I have a problem: I have to send to router all the commands and then I have to read the output. If I send a command1...
4
by: seets375 | last post by:
Hi, I have two ethernet interfaces on my system, with IPs assigned to the interfaces from different subnets (e.g. eth1 - 10.10.10.10 and eth2 - 20.20.20.20 ). I'm connecting these interfaces to...
3
by: =?Utf-8?B?Vk1BTQ==?= | last post by:
Hi, I have a home network with a DSL router. I want to check the router state (connected, disconnected...) from an XP computer on the network by showing an icon (green / red) in the system tray....
5
by: =?Utf-8?B?SmltbWVy?= | last post by:
Hello, I've been trying to create a WCF SOAP Router Service that can forward not just the message body but also any security headers set by the originator of the message. The destination service...
1
by: izecul | last post by:
Hi, I'm a newbie here, and what I know about networking you can probably copy on a matchbook :) That said, here's my problem: I've got two wireless routers - D-Link DI-524 and Airlink AR325W....
3
by: apg018 | last post by:
Hi - I just bought an Asus laptop with wireless capabilities. I have a desktop that I've used for years that is hooked up to Cox cable for high speed internet through a Motorola SG5120 cable modem....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.