PC Review


Reply
Thread Tools Rate Thread

Is ASP.NET App Being Accessed Internally/Externally

 
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      5th Feb 2007
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.
 
Reply With Quote
 
 
 
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      5th Feb 2007
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" <(E-Mail Removed)> wrote in message
news:34465F6F-CF34-4F3F-9E26-(E-Mail Removed)...
> 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.



 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      5th Feb 2007

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

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



"Mike" <(E-Mail Removed)> wrote in message
news:34465F6F-CF34-4F3F-9E26-(E-Mail Removed)...
> 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.



 
Reply With Quote
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      5th Feb 2007
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" <(E-Mail Removed)> wrote in message
> news:34465F6F-CF34-4F3F-9E26-(E-Mail Removed)...
> > 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.

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access internally not externally =?Utf-8?B?THVpcyBGLiBMZW9u?= Windows XP Work Remotely 1 28th Dec 2004 08:49 PM
Accessing Sites Internally vs. Externally =?Utf-8?B?Sm9obiBBLiBKYW5lcw==?= Microsoft Dot NET 2 7th Dec 2004 08:35 PM
Can see website externally but not internally Sue Microsoft Windows 2000 1 27th Apr 2004 02:14 PM
Domain used internally / externally? Jackal Microsoft Windows 2000 Active Directory 11 9th Apr 2004 12:18 PM
DNS issues internally and externally John Mc Microsoft Windows 2000 DNS 2 8th Jan 2004 04:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:26 AM.