IP authentication problem
How can authentication with the IP address ?
I am developing a intranet site, I want to authenticate different users with the IP address.
If user IP address have in tpuser2 table that user can enter the data and other users are not allow
IP field datatype is character.
When as remote_addr return int value.
Sometime it work and some time it does not work.
There is any other method that can authenticate user with the IP ADDRESS ?
remoteaddr = Request.ServerVariables("REMOTE_ADDR")
dim ssql
set cn=server.CreateObject("adodb.connection")
cn.ConnectionString="Provider=SQLOLEDB.1;Integrate d Security=SSPI;Persist Security Info=False;Initial Catalog=dcil;Data Source=AUHTRIPSVR2"
cn.Open
ssql="select ip from tpuser2 where ip='"& remoteaddr & "'"
set rs=cn.Execute(ssql)
if Not rs.EOF Then
Response.Redirect("http://dcilweb/tp_drawings/dwg_add.asp")
Else
Response.Redirect("http://dcilweb/DCILDepts/CompSys/dotpauthen2.asp")
End If
Mateen
|