Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Security (http://www.velocityreviews.com/forums/f62-asp-net-security.html)
-   -   Disabling direct HTTP access to certain folders on server (http://www.velocityreviews.com/forums/t768536-disabling-direct-http-access-to-certain-folders-on-server.html)

Vikas 04-25-2006 06:50 AM

Disabling direct HTTP access to certain folders on server
 
Hi
I am using .Net Framework 1.1. There are some XSL files in a folder of my
web application. I want to restrict a user from directly accessing these
files - e.g. I want to display a forbidden page when he types the URL
http://Myserver.com/MyApp/XMLFolder/pqr.xsl

However the ASP.Net application should be able to access these files i.e. it
should be able to apply the XSL Stylesheets to the corresponding XML files.
It would be a great help if someone could let me know how to do the same
Thanks
Vikas


Dominick Baier [DevelopMentor] 04-25-2006 07:28 AM

Re: Disabling direct HTTP access to certain folders on server
 
Hi,

find more info here:

http://www.leastprivilege.com/Protec...hASPNET20.aspx
http://www.leastprivilege.com/MoreOn...hASPNET20.aspx

in your case you only have to map the .xsl extension in iis to aspnet_isapi
and put a HttpNotFoundHandler in place...

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> Hi
> I am using .Net Framework 1.1. There are some XSL files in a folder of
> my
> web application. I want to restrict a user from directly accessing
> these
> files - e.g. I want to display a forbidden page when he types the URL
> http://Myserver.com/MyApp/XMLFolder/pqr.xsl
> However the ASP.Net application should be able to access these files
> i.e. it
> should be able to apply the XSL Stylesheets to the corresponding XML
> files.
> It would be a great help if someone could let me know how to do the
> same
> Thanks
> Vika




Vikas 04-25-2006 10:08 AM

Re: Disabling direct HTTP access to certain folders on server
 
Hi Dominick
I tried that - but the problem is that this prevents the xsl file being
applied to the corresponding xml file.
Actually, let me clarify. There is a static aspx page, which contains an
iframe that hosts the xml. The xsl is applied to this xml.
If I apply an HttpForbiddenHandler to xsl files, the stylesheet doesnt get
applied at all and the frame displays "Cannot view XML input using XSL style
sheet".
Thanks in advance.
Vikas


"Dominick Baier [DevelopMentor]" wrote:

> Hi,
>
> find more info here:
>
> http://www.leastprivilege.com/Protec...hASPNET20.aspx
> http://www.leastprivilege.com/MoreOn...hASPNET20.aspx
>
> in your case you only have to map the .xsl extension in iis to aspnet_isapi
> and put a HttpNotFoundHandler in place...
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
> > Hi
> > I am using .Net Framework 1.1. There are some XSL files in a folder of
> > my
> > web application. I want to restrict a user from directly accessing
> > these
> > files - e.g. I want to display a forbidden page when he types the URL
> > http://Myserver.com/MyApp/XMLFolder/pqr.xsl
> > However the ASP.Net application should be able to access these files
> > i.e. it
> > should be able to apply the XSL Stylesheets to the corresponding XML
> > files.
> > It would be a great help if someone could let me know how to do the
> > same
> > Thanks
> > Vikas

>
>
>


Dominick Baier [DevelopMentor] 04-25-2006 10:23 AM

Re: Disabling direct HTTP access to certain folders on server
 
well - if you need to access the .xsl from "outside" the web server this
won't help you.

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> Hi Dominick
> I tried that - but the problem is that this prevents the xsl file
> being
> applied to the corresponding xml file.
> Actually, let me clarify. There is a static aspx page, which contains
> an
> iframe that hosts the xml. The xsl is applied to this xml.
> If I apply an HttpForbiddenHandler to xsl files, the stylesheet doesnt
> get
> applied at all and the frame displays "Cannot view XML input using XSL
> style
> sheet".
> Thanks in advance.
> Vikas
> "Dominick Baier [DevelopMentor]" wrote:
>
>> Hi,
>>
>> find more info here:
>>
>> http://www.leastprivilege.com/Protec...cesWithASPNET2
>> 0.aspx
>> http://www.leastprivilege.com/MoreOn...ourcesWithASPN
>> ET20.aspx
>>
>> in your case you only have to map the .xsl extension in iis to
>> aspnet_isapi and put a HttpNotFoundHandler in place...
>>
>> ---------------------------------------
>> Dominick Baier - DevelopMentor
>> http://www.leastprivilege.com
>>> Hi
>>> I am using .Net Framework 1.1. There are some XSL files in a folder
>>> of
>>> my
>>> web application. I want to restrict a user from directly accessing
>>> these
>>> files - e.g. I want to display a forbidden page when he types the
>>> URL
>>> http://Myserver.com/MyApp/XMLFolder/pqr.xsl
>>> However the ASP.Net application should be able to access these files
>>> i.e. it
>>> should be able to apply the XSL Stylesheets to the corresponding XML
>>> files.
>>> It would be a great help if someone could let me know how to do the
>>> same
>>> Thanks
>>> Vikas





All times are GMT. The time now is 02:26 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57