IIS 5 & IIS 6
application extention problem
Last post Nov 24, 2008 01:35 PM by tylermaudlin
Nov 21, 2008 01:02 PM|tylermaudlin|LINK
I have an application where the user is required to log in running on asp.net 2.0
I have added .doc and .pdf to the application extensions area so that outside users
cannot go directly to the .doc or .pdf file without logging in.
When I click on a .doc or .pdf file to view i get
when I take this out of the application extensions it works but then IIS is not controlling security.
Has anyone had this problem and what solution fixed it.
Nov 21, 2008 01:08 PM|Rovastar|LINK
Set the properties of the individuals files for anonymous access.
Nov 21, 2008 01:16 PM|tylermaudlin|LINK
well that did not work
the problem is it works on another machine running asp.net 1.1
but now on this machine running asp.net 2.0 it does not work
Nov 21, 2008 02:49 PM|tylermaudlin|LINK
FOUND THE SOLUTION
I took out the file types .doc and .pdf in application extension
and added to wildcard section below
do not check files exists.
AND NOW IT WORKS
when user goes directly to document it requires them to log in first
and when user clicks on link the document opens for pdf for file save option for .doc files
Nov 24, 2008 01:35 PM|tylermaudlin|LINK
Actually the wildcard solution did not work it did but it also disallowed the viewing of the image file on the logon page - as soon we logged on the image displayed.
These entries in the web.config file finally got the job done.
<add path="*.pdf" verb="*" type="System.Web.StaticFileHandler" />
<add path="*.doc" verb="*" type="System.Web.StaticFileHandler" />
in section <httpHandlers>