How can we restrict the ip range to access my web application

  • Thread starter Thread starter ad
  • Start date Start date
A

ad

I want to restrict only a range of ip can access my web application.
How can I do that ?
 
Look in IIS - the virtual directory properties - security... there you will
see an option for restricting access by IP.
 
Can we do the restriction in application?

mr fox said:
Look in IIS - the virtual directory properties - security... there you will
see an option for restricting access by IP.
 
Can we do the restriction in application?

You could put some code in the Application_Start method in Global.asax which
interrogated the IP address of the incoming request and then redirected
somewhere else if the address was outside your allowed range. This might, in
fact, be your only option for a site hosted on a public ISP which doesn't
allow you access to the virtual directory settings.
 
Hi Mark:

I think you meant to say Application_BeginRequest....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top