Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > Visual Studio 2005
|
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 29th, 2007, 01:15 AM
Registered User
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Determine if user is accessing through Internet or

Hi! I have a web application which can be accesses through the Internet and Intranet.

I created a log-in for the users of the system, but how can the program determine whether the user is accessing the program through the Internet or the Intranet?

Any advices? Thanks in advance!
 
Old November 29th, 2007, 05:42 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Can you define a IP range for intranet users?
Can you identify a windows domain identity for intranet users?

-Peter
 
Old December 7th, 2007, 02:48 AM
Registered User
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No I can't. Is there a way that i can program to check without having to know those IP range?

 
Old December 7th, 2007, 08:41 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

How are the users connected to the intranet? Even if they are connected through the internet, they are likely connecting into your system via a VPN (otherwise, we can't really call it an inTRAnet). Therefore, there must be some way to identify inTRA versus inTER-net users. Generally speaking, any IP like this (192.168.*.*) or this (10.*.*.*) is an "internal" address whether it's on a LAN or WAN.

The only other way I can see doing this is to enable Integrated Windows Authentication as well as anonymous access to your web application. If the user is connecting with IE on Windows and they are logged in with an account that is discoverable on the same active directory domain that the web server is on then you may be able to match their identify. However, I think this would regardless of how they are connecting.

I guess the next question really is:
Are you concerned with determining WHO is connecting or HOW they are connecting?

-Peter
 
Old December 9th, 2007, 09:14 PM
Registered User
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm more into how they are connecting...

This is the case...I have a login page...all users who will logged in through the intranet can access the website, but some users will be restricted to access the website if they are accessing through the internet....so I was thinking of determining whether they are accessing through the internet or intranet...

 
Old December 10th, 2007, 10:45 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Without being able to define an IP range to determine LAN/WAN versus the public internet I don't think you can do this. But as I stated before, I can't imagine that you wouldn't be able to determine some set of IPs that would discriminate between users.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing Internet Explorer instance parentWindow nzakas C# 0 February 16th, 2006 10:57 PM
Accessing Properties in User Controls andyj00 ASP.NET 1.0 and 1.1 Professional 16 August 1st, 2005 07:55 AM
Accessing Properties in User Controls andyj00 Classic ASP Professional 1 May 21st, 2005 02:52 PM
How to prompt user Internet Connection Wizard? joan VS.NET 2002/2003 0 September 30th, 2003 10:31 PM
Determine User Name at Runtime dgarner ASP.NET 1.0 and 1.1 Professional 4 July 17th, 2003 04:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.