Click here to Skip to main content
15,884,425 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to restrict the access to a web page i.e it should be opened from a specific list of computers. How can I do that using c# in ASP.NET. Please specify the different ways of identifying a computer and thereby restrict the access to unauthorized computers
Posted

1 solution

You can't in practice identify a computer from the server - or at least not in a way that can't be spoofed in some manner.

IP addresses are router based - the actual PC information does not get through the router, so all PC's on an ADSL line for example would be identified by the same IP address.
MAC addresses you can't get at because they also don't pass through the router.
The only way to uniquely identify a PC as "allowed in here" is to use a cookie on the PC, but it's not that secure.

The normal way to handle this is to allow access based on user, rather than the work station the user is operating at.
 
Share this answer
 
Comments
Srivikas 30-Oct-12 6:27am    
Can you please tell how we can do that based on users.
OriginalGriff 30-Oct-12 6:32am    
have a look at Membership: http://msdn.microsoft.com/en-us/library/yh26yfzy(v=vs.85).aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900