How can you allow users based on their IP in web.config?

trend

Centurion
Joined
Oct 12, 2004
Messages
171
I need to allow users based on IP in the web.config.

The reason for this is because ,if you have the auth set to forms.. then you cannot change the pages via frontpage extensions.. You have to manually ftp in, and upload the project that way :/


Any ideas?

thanks
Lee
 
You could restrict access via IIS manager this way but not through a web.config - restricting by IP is also not a good security model on it's own for anything other than a pure intranet application, and even then addresses can be spoofed.
 
Then how do people update webpages when the web.config is set to forms authentication and deny all unlogged in people?

Do they all just have to upload the projects via ftp?
 
Forms authentication has nothing to do with putting files onto a web site via FTP. See Forms Authentication in MSDN.

To the Front Page stuff:

For one a serious developer isn't going to use Front Page for several reasons...namely you use Visual Studio to create pages, and two Front Page can't be of much use to anyone doing a serious .NET web application because all it really does (easily) is static html. It provides support for more, but it's half-***, and just ASP 3.0 from what I've seen. And if you can't afford Visual Studio Pro, Standard in the language of your choice is only $100 US.

Secondly, a well designed application isn't going to require uploading pages over and over again. That's the whole purpose of ASP - whether it be 3.0 or .NET 1.0/1.1/2.0 - make the page once, change the data via a database. If you're really good you change the entire layout via a database and changes in your style sheet. If for every change you're downloading and uploading pages, then you've missed the point of ASP - you may as well doing regular HTML pages.

That said, when I develop a ASP application, if it's going to a virtual server - for a 'home' project - I just ftp up the files, rarely do I change any of the asp pages themselves unless it's a typo or something I missed as far as accessiblity requirements. If I want to change the visual layout, I just change my master style sheet - and that might happen once a year. If it's a 'work' project I have to create an MSI and it has to be installed because I'm not allowed access to the servers - as it is in most companies.

If you have a well thought out design you should rarely, if ever, other than for upgrades, touch the html/asp or the code behinds.
 
Back
Top