473,382 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Grabbing IP adres from ASP webform

Dear all,

I know this question has been discussed in another topic but I feel
that I lack a little bit of knowledge to grasp what was said there.
My problem is as follows :

As a trainer in a company, I launched a webform asking people to log
in before they can access the needed training. Nothing fancy and just
there for monitoring who comes in and when. Problem is that some
"nice-guys" enter who knows what - because that's fun. Can I
counteract this by having the ASP form sending me also the IP address
from the PC ? And where do I have to add these lines ?

This is the code I use in my ASP form :

<%
Dim MyBody
Dim MyCDONTSMail
Dim Name
Dim Team
Dim Subject
Dim Comment
%>
<%
Name = Request.Form("Name")
Team = Request.Form("Team")
Subject = Request.Form("Subject")
Comment = Request.Form("Comment")
%>
<%
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "XX@xx"
MyCDONTSMail.To= "xx@xx"
MyCDONTSMail.Subject="xxxxxxxx"
Mybody = "This mail has been sent by the automated customer
feedback engine" & vbCrlF
Mybody = Mybody & "Please find enclosed the data as filled in" &
vbCrlF & vbCrlF
MyBody = MyBody & "Name: " & Name & vbCrlF
MyBody = MyBody & "Team: " & Team & vbCrlF
MyBody = MyBody & "Subject: " & Subject & vbCrlF
MyBody = MyBody & "Comment: " & Comment & vbCrlF & vbCrlF &
vbCrlF
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
Response.Write "Thank you, " & Name & ", for following the
WebTraining."
Response.Redirect("xxx.htm")
set MyCDONTSMail=nothing
%>

All help is highly appreciated. Please do understand that I'm new at
this ASP thing and that it might take some time for me to understand.

Br,

Kris
Jul 19 '05 #1
3 1332
Kris wrote on 26 aug 2004 in microsoft.public.inetserver.asp.general:
Can I
counteract this by having the ASP form sending me also the IP address
from the PC ?


No, because an IP address does not belong to a pc.

If you catch the IP by request.servervariables("remote_addr"):

You could get the clients isp connection IP adress, which is constant in
some cases, semiconstant in others and changing at every dial in in others
again.

Some isps have one IP addres for thousends of clients/surfers at one time.

Some/many? clients use a proxi, masking their "own" ip.

Clients on a LAN translate/mask their local ip to a common ip of the
connection, which again is subject to all the above.

On top of that all, hackers have found ways to "spoof" ips.

So yes you can "counteract", but not allways.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 19 '05 #2
Agreed ... that might be the case but the problem is not of that size.
What is happening is that some users are logging by typing in other
users names ... if I could "grab" the IP adres from the PC they are
logging in from, I would be able to see who and what.

Anybody having a great idea and euh ... feel free to modify my code.

Br,

Kris
Jul 19 '05 #3
As stated, request.servervariables("remote_addr") is your only bet

Jeff

"Kris" <ru**********@hotmail.com> wrote in message
news:f9**************************@posting.google.c om...
Agreed ... that might be the case but the problem is not of that size.
What is happening is that some users are logging by typing in other
users names ... if I could "grab" the IP adres from the PC they are
logging in from, I would be able to see who and what.

Anybody having a great idea and euh ... feel free to modify my code.

Br,

Kris

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andrew | last post by:
Hi, Until now, I have used a single webform for my web app, and everything's been OK. Now, I've decided to create a main menu webform. So, I've got two webforms. Using Visual Studio .NET (with...
4
by: InvisibleMan | last post by:
Hi, Thanks for any help in advance... I'm wondering if anyone knows how or has the resource for graabing a users email address without them knowing? Before I hear all the 'Its not ethical'...
1
by: hqdtech | last post by:
how to refresh webform from other webform I have 2 webform, i want if webform A was close then webform B wil refresh. And the problem second: how to catch packet on the network in C#. ...
3
by: trint | last post by:
Ok, I have tried to do this with the System.Web.UI and can't find anything for the webform. It seems much easier for a Winform. Any help in trapping Webform keydown event and keyup event is...
5
by: Jerry | last post by:
I am using .Net 2003. I have been working with this ASP.Net webform that I created a few weeks ago. It has been working fine. However, while modifying the webform today, this webform stopped...
2
by: Craig Douthitt via DotNetMonster.com | last post by:
I am trying to capture an buttonclick on a usercontrol in the webform the usercontrol resides in. After researching this issue, I've come to believe that the best way of handling this is by raising...
0
by: .Net Sports | last post by:
I've been looking everywhere, but i can't locate any functions, or articles on the net or my resources, on how to open a file using vb.net, and then grabbing certain parts of the file, and putting...
5
by: joe_doufu | last post by:
Hi, old web developer, new to Ajax and XML here. I'm developing an application that grabs an XML file from a (PHP) web service. In fact, it's going to be an online game. When the user clicks a...
5
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have start web form and when the user clicks a button (server.transfer) they are directed to the second webform. I was wondering if there is a way to create an instance of the first webform...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.