473,322 Members | 1,493 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,322 software developers and data experts.

Is ASP.NET App Being Accessed Internally/Externally

Hi.

In VB.NET, is it possible to determine whether an ASP.NET is being accessed
internally (within the same domain hosting the application) or externally
(across the internet)? I've looked at using the HttpRequest.ServerVariables
Property, but it doesn't look like it's NameValueCollection contains any
items which would identify whether or not a program is being accessed
internally/externally.

Basically I need to apply certain logic when a program is accessed
internally (within my company) and different logic when a program is accessed
externally (across the internet).

Is this possible?

Thanks.
Feb 5 '07 #1
3 1372
The only thing that comes to mind is attempting to filter based upon IP
address. The username property I've found doesn't always show the name of a
domain user so that isn't always reliable. The server itself knows nothing
about where the client request is coming from other than the IP address and
it has no way of knowing if it's in your network or not. You could parse the
IP address and check if it's within the range of your network. If you create
a filter or range, you may consider not hard-coding it and placing the data
in the web.config so you can quickly adapt if the network grows/shrinks.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Mike" <Mi**@discussions.microsoft.comwrote in message
news:34**********************************@microsof t.com...
Hi.

In VB.NET, is it possible to determine whether an ASP.NET is being
accessed
internally (within the same domain hosting the application) or externally
(across the internet)? I've looked at using the
HttpRequest.ServerVariables
Property, but it doesn't look like it's NameValueCollection contains any
items which would identify whether or not a program is being accessed
internally/externally.

Basically I need to apply certain logic when a program is accessed
internally (within my company) and different logic when a program is
accessed
externally (across the internet).

Is this possible?

Thanks.

Feb 5 '07 #2

Check this article:
http://www.codeproject.com/aspnet/httpRefererFilter.asp

it will show you more details about what is going on.

"Mike" <Mi**@discussions.microsoft.comwrote in message
news:34**********************************@microsof t.com...
Hi.

In VB.NET, is it possible to determine whether an ASP.NET is being
accessed
internally (within the same domain hosting the application) or externally
(across the internet)? I've looked at using the
HttpRequest.ServerVariables
Property, but it doesn't look like it's NameValueCollection contains any
items which would identify whether or not a program is being accessed
internally/externally.

Basically I need to apply certain logic when a program is accessed
internally (within my company) and different logic when a program is
accessed
externally (across the internet).

Is this possible?

Thanks.

Feb 5 '07 #3
That is an excellent suggestion. Thank you for your time and knowlege!
Mike

"Mark Fitzpatrick" wrote:
The only thing that comes to mind is attempting to filter based upon IP
address. The username property I've found doesn't always show the name of a
domain user so that isn't always reliable. The server itself knows nothing
about where the client request is coming from other than the IP address and
it has no way of knowing if it's in your network or not. You could parse the
IP address and check if it's within the range of your network. If you create
a filter or range, you may consider not hard-coding it and placing the data
in the web.config so you can quickly adapt if the network grows/shrinks.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Mike" <Mi**@discussions.microsoft.comwrote in message
news:34**********************************@microsof t.com...
Hi.

In VB.NET, is it possible to determine whether an ASP.NET is being
accessed
internally (within the same domain hosting the application) or externally
(across the internet)? I've looked at using the
HttpRequest.ServerVariables
Property, but it doesn't look like it's NameValueCollection contains any
items which would identify whether or not a program is being accessed
internally/externally.

Basically I need to apply certain logic when a program is accessed
internally (within my company) and different logic when a program is
accessed
externally (across the internet).

Is this possible?

Thanks.


Feb 5 '07 #4

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

Similar topics

2
by: Marc | last post by:
Hi all, I have a problem with managing the interchange between COM/Excel and Python if the user closes the workbook externally. Everything works fine as long as the user only uses the exit...
2
by: John A. Janes | last post by:
Here's an odd one, I'm currently developing a site for internal usage, to get around their public website, I set the internal server to port 8080 (I publish my .net from my office externally). ...
7
by: Paul Kirby | last post by:
Hello All I am writing an application and a dll file and I was wondering how I would access functions within the exe file from the dll? Example: /* EXE File */ long GetUserCount(void) {
1
by: John E | last post by:
I have an Access 2000 database in which there are remotely linked SQL tables and a couple of local tables. If I have queries in Access that are designed to pass data between these remote linked...
2
by: Saifee | last post by:
hi, i want to send mail through asp.net internally in the organiztion and also externally how to do tat, n also wat setting is required on IIS SMTP pls help
3
by: Shawn T | last post by:
I have an application with a page that has a web user control When I call that page that has this user control, locally (http:// localhost/ApplicationX/default.aspx) and also externally ie...
3
by: Spam Catcher | last post by:
Is there a way to externally add items to ASP.NET's data cache? Any sort of APIs in .NET? I have a Windows forms program which may need to add some items. Or I guess I could just call a...
1
by: donovant | last post by:
HI There, We have an in-house vb.net/C# application which basically serves as a database front end. The application was initially desgned primarily for in-house use only, however recently the...
1
by: Nilam2477 | last post by:
I have a application wherein database is located on server and there are client computer which access the central database server. How do i handle a situation when more than one client tries to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.