Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Robot Issues with ASP Authentication 1

Status
Not open for further replies.

sene

IS-IT--Management
Nov 15, 2001
2
FR
We are using atomz.com to provide a search function on our site. Recently we changed all our pages to .asp and now have a basic asp login. atomz.com supports Basic HTTP Authentication when crawling the site to index it, but does not support asp authentication. So... is there a way to exclude a certain IP Address from being prompted for a password on my asp pages? Any other suggestions would be greatly appreciated.
 
Hi,

I don't know if this can suits you!! This is an old code I had to deny access to those computers that didn't belong to our intranet.

' Remote IP
IP = Request.ServerVariables("REMOTE_ADDR")
' Classe C Domain from IP
Dom = Mid(IP, 1, InStrRev(IP, ".") - 1)
' Verify if it is a local domain address
If (Dom = "193.136.###" OR Dom = "193.136.###") Then
Session("Local") = True
Else
Session("Local") = False
End If

You must change ### for a suitable number!!
I put this code on global.asa and in each page I checked if the remote address was local or not. If it was not I redirect it to other page.

Regards,
Luís Silva
 
You'll want to look at the HTTP agent used to access the website...

If Instr(LCase(Request.ServerVariables(&quot;HTTP_USER_AGENT&quot;)),&quot;googlebot&quot;) <> 0 Then
blnAuthGood = True
ElseIf [myauthchek]
blnAuthGood = True
Else
blnAuthGood = False
End If

If NOT blnAuthGood Then 'Wasn't cookie or google
Response.Redirect(&quot;myregistrationpage.asp&quot;)
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top