Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 24th, 2003, 04:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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





Similar Threads
Thread Thread Starter Forum Replies Last Post
LDAP Authentication Problem zicaden Classic ASP Basics 6 January 14th, 2007 06:23 PM
Problem with authentication users hcusto BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 August 9th, 2006 02:32 PM
User Authentication problem asif_sharif ASP.NET 1.0 and 1.1 Professional 1 January 1st, 2006 04:48 PM
User Authentication problem asif_sharif ASP.NET 1.0 and 1.1 Professional 1 January 1st, 2006 04:48 PM
Authentication Problem CW Classic ASP Databases 2 October 30th, 2003 06:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.