View Single Post
 
Old April 20th, 2004, 11:38 AM
druid2112 druid2112 is offline
Registered User
 
Join Date: Apr 2004
Location: Nashville, TN, .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Referrer and Uri

I just want to confirm that the request coming in to my page is from a certain IP.

If I try this:

Dim foo as String = Request.UrlReferrer.ToString
If Not foo.Equals("999.888.777.666") Then
  ' go to some error page
  Response.Redirect("/foo/bar/noauth.aspx?ErrMsg=" & foo)
  ' or
  ' Responst.Redirect("/foo/bar/noauth.html")
Else
  ' do the rest of my stuff.....

I get a null ref exception, but I can't set the uri to a "new",
why do i have none?

There has to be an easier way than this Uri b.s.

Thanks