473,770 Members | 4,198 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Ser verVariables
Property, but it doesn't look like it's NameValueCollec tion 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 1396
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**@discussio ns.microsoft.co mwrote in message
news:34******** *************** ***********@mic rosoft.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.Ser verVariables
Property, but it doesn't look like it's NameValueCollec tion 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**@discussio ns.microsoft.co mwrote in message
news:34******** *************** ***********@mic rosoft.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.Ser verVariables
Property, but it doesn't look like it's NameValueCollec tion 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**@discussio ns.microsoft.co mwrote in message
news:34******** *************** ***********@mic rosoft.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.Ser verVariables
Property, but it doesn't look like it's NameValueCollec tion 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
2074
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 keys I've provided to close the Excel apps and COM interfaces. But I really need the ability to manage the workbook if someone closes it using the 'exit' command or the right/upper 'x' from within the excel spreadsheet.
2
287
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). There is no problem at all accessing the site externally, but it is almost impossible to access internally. I checked to make sure I have no references in the site to the external publishing address. This may be a very simple problem, but one I...
7
1475
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
5656
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 and local tables, is it possible to execute these queries externally (i.e. from outwith Access) using, for example, .NET/C#? Or is it possible to run an Access user defined function or macro externally which then in turn deals with the queries? ...
2
1302
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
3399
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 (http:// <webserver>/ApplicationX/default.aspx), the display is all different. For example, a text box shows with border on one and textbox shows as label in the other. I am suspecting that it might be CSS issue. I checked the CSS file and everything...
3
1215
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 webpage. Hmm. -- spamhoneypot@rogers.com (Do not e-mail)
1
1635
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 apllication is being by a few users working from home, and they have come accross a few issues which did not occur when they used the application in the office. The main issue is that the batch report generator function of the application generates...
1
2186
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 access the same data table on the server. I'm using SQL Server 2005. It it internally handled in SQL 2005? or i need to handle in my C# code? Please help
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10059
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10005
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6679
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5452
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.