DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   application extension problem (http://www.daniweb.com/forums/thread158826.html)

tylermaudlin Nov 21st, 2008 2:57 pm
application extension problem
 
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

Internet Explorer cannot display the webpage
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.

Thanks

serkan sendur Nov 25th, 2008 12:30 pm
Re: application extension problem
 
enable folder access rules via web.config file. then put all the secure files in that folder. it is really easy to implement.

tylermaudlin Nov 25th, 2008 2:33 pm
Re: application extension problem
 
acctually this is what fixed my problem
<httpHandlers>
<add path="*.pdf" verb="*" type="System.Web.StaticFileHandler" />
                        <add path="*.doc" verb="*" type="System.Web.StaticFileHandler" />
</httpHandlers>


All times are GMT -4. The time now is 1:55 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC