?
Solved

ASP to check the source IP address

Posted on 2006-05-16
12
Medium Priority
?
346 Views
Last Modified: 2012-06-27
HI,
  I would like to do this.

There are 3 sites, say A, B and C

I want to force user login if they are from site C (C will have a link to link to site B)
if user from site A, no need to login (there will be a link to site B too)

I try to check IP address and Host name of Site C but it always show my PC's IP and the host name will be site B.

The idea case is the program runs in site B can detect site C's IP / host name but seems it is impossible,

any other ways?
0
Comment
Question by:gorexy
  • 7
  • 5
12 Comments
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16689916
Request.ServerVariables("HTTP_REFERER")

that tells you were they came from
0
 

Author Comment

by:gorexy
ID: 16689939
this will show the host
is it possible to check IP?
0
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16689946
Request.ServerVariables("REMOTE_ADDR")

think that does the IP
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16689948
oh wait do you mean the IP of the last Site and not the user?
0
 

Author Comment

by:gorexy
ID: 16689951
say Site C in  my example
0
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16689977
http://neural.cs.nthu.edu.tw/jang/sandbox/asp/examples/request5.asp

see the HTTp_REFERER should say experts Exchange

so when they enter in your example extract the site C part and then you know it is Site C.

0
 

Author Comment

by:gorexy
ID: 16689998
ok seems hard to get the IP
0
 

Author Comment

by:gorexy
ID: 16690030
sorry i post a querstion but so far no one can answer

can u answer that?

how can we display 2D line graph in ASP without installing component?

I will give u mark in a new question
0
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16690032
you get the URL with this from site C yeh? You can not get the sites IP with Server Variables as far as I know, and as far as documentation on the net.

or site B or Site A

so when it comes through you check the URL,

You can easily differentiate between all of your sites with this information, granted that an IP would be th ideal situation for you but still if it were me I would have all the info I needed to differentiate between the sites using string manipulation on th URLs.

If you accept this method I will help you Identify the sites.

Andrew
0
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16690060
You cannot do this with ASP, it has no Graphics Device Interface (GDI) so you have to use a third party component that will have been designed in C# C++ or Java etc, and then using the component you supply it co-ordinates etc... and it comiles and makes the IMage which returns your Chart
0
 

Author Comment

by:gorexy
ID: 16690073
oh..the referrer is enugh the host name is already good to me

hm..ok do you know is there any FREE java applet can let me fast do the 2D graph display?
0
 
LVL 20

Accepted Solution

by:
REA_ANDREW earned 120 total points
ID: 16690112
This might be a solution for you that does not use third party components as such, but the actual MS Office Charting Engine.

http://www.asp101.com/articles/chris/aspcharts/default.asp
Office Web Components (OWC)

Apart from this I can help no further.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month16 days, 14 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question