Solved

Block single .aspx page from being accesses from a single public IP

Posted on 2013-06-26
3
500 Views
Last Modified: 2013-06-28
I want to block www.example.com/user/login.aspx from being accessed from an external IP address of 1.2.3.4. Users at 1.2.3.4 still need to be able to access www.example.com/user and all other pages in that sub folder, just not login.aspx. Can this be accomplished?
0
Comment
Question by:Wetjet
3 Comments
 
LVL 25

Accepted Solution

by:
Ron M earned 250 total points
Comment Utility
...on the load event for the login.aspx page..

 If Request.UserHostAddress.ToString = "1.2.3.4" Then
            Response.Redirect("www.someurl.com")
        End If
0
 
LVL 11

Assisted Solution

by:Sanjay Santoki
Sanjay Santoki earned 250 total points
Comment Utility
Hello,

You can achieve it if you have IP address and Domain restrictions feature is installed in IIS role. Install if it is not installed and follow below simple steps to achieve your requirements;

Open IIS Manager -> Expand www.example.com -> users -> changed to content view which will show you list of files located under users folder -> right click on login.aspx -> switch to features view -> IP Address and Domain Restrictions -> from the Action pane select Add deny entry

;)

Regards,
Sanjay Santoki
0
 

Author Closing Comment

by:Wetjet
Comment Utility
Thank you both of you.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now