views:

67

answers:

1
+2  Q: 

IsInNet for ASP

First Post.

So I am working on a project due to some drawbacks to the abilities of a standard PAC file. Basically we need to route proxy rules based on the internal subnet of the requester. Currently the IsInNet function is the option, however this is client side and has many failpoints due to it's dependency on the myIpAddress function (IPv6 enabled FF, default route adapter not being the highest priority bind in windows, etc...) which makes it unreliable in an enterprise deployment.

I have coded an ASP extension to serve pac files based on the REMOTE_ADDR of the requester because I believe this will scrub out all of the mess that doing this client side will add. The issue is that I cannot figure out with ASP how to do a sub-net compare to something other then a simple /8,/16 or /24 without doing something extremely messy and inaccurate like splitting the octets into individual strings and doing comparisons.

Thank you for your time.

-Ryan

A: 

An IP address(192.168.1.2) can be treated as a number, as well as the mask. And I just noticed the date, and that this might be an IPv6 question...

dbasnett