|
|
ASP.NET VB.NET
Started by freek at 06-18-2007 7:30 PM. Topic has 3 replies.
 
 
|
|
Sort Posts:
|
|
|
|
06-18-2007, 7:30 PM
|
freek
Joined on 06-19-2007
Posts 1
|
|
|
i have a web.config file in my admin folder. right now it protects the files but not the directory. it wont redirect back to the login page, i gives a "directory listing denied" error. it also dosen't like to protect .txt files.
any ideas...?
|
|
|
|
|
Report
|
|
|
|
05-28-2008, 2:11 PM
|
DeveloperBarn
Joined on 05-29-2008
Reston, VA
Posts 24
|
Re: web.config problems...
|
|
|
|
|
Post the content of your web.config file so we may help you troubleshoot.
Jason Founder, DeveloperBarn Forums http://www.developerbarn.com
No longer a WebHost4Life Customer
|
|
|
|
|
Report
|
|
|
|
05-28-2008, 2:50 PM
|
deanman
Joined on 04-11-2007
Posts 187
|
Re: web.config problems...
|
|
|
|
|
Forms authentication -- which can be handled from within the web.config file --, applies only to ASP.NET files (.aspx etc.)!
In order to protect non-ASP.NET files -- such as '.txt' files etc. --, on IIS 6, you have to register those file extensions and their related handler in IIS. You can do that from you control panel (Set Script Map). Then, you have to write some code (the handler) to detect access to those files and to take the appropriate actions such as blocking.
Beginning with IIS 7, you can handle that stuff from within your 'web.config'.
Note: Special ASP.NET folders (App_Code etc.) and files (.aspx etc.) are protected by design and there is no special need to protect them.
I <3 WebHost4Life.com
|
|
|
|
|
Report
|
|
|
|
05-28-2008, 2:59 PM
|
DeveloperBarn
Joined on 05-29-2008
Reston, VA
Posts 24
|
Re: web.config problems...
|
|
|
|
|
You can protect entire directories and the files within using web.config:
http://msdn.microsoft.com/en-us/library/6hbkh9s7(VS.80).aspx
Jason Founder, DeveloperBarn Forums http://www.developerbarn.com
No longer a WebHost4Life Customer
|
|
|
|
|
Report
|
|
|
|
|
Webhost4life Fo... » General Discuss... » ASP.NET VB.NET » Re: web.config problems...
|
|
|
|