Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protection of specific files in local
Message
From
07/07/2006 11:18:08
 
 
To
07/07/2006 10:12:45
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01133718
Message ID:
01134475
Views:
21
Hi,

>>The approach you're looking at in the other thread might work (Context.Handler.GetType().??? in Application_PreRequestHandlerExecute may be what you need).
>
>Yes, I have been trying to find the proper syntax for that. Basically, even if a type is returned in the error message, I was not able to make a reference to it in the code as it does not appear in the list of type.

Just tested in C#:
string s = Context.Handler.GetType().Name
If the browser is asking for a standard page (e.g default.aspx) then s="default_aspx". If the browser is asking for "Web.config" then s = "HttpForbiddenHandler". Don't know why, in the first instance, it's not giving the default HttpHandler tho.....

>
>>But I wonder whether you would be better off subclassing the page class for use with the framework and passing the page to the framework somewhere during the page creation. That way only valid pages (in fact only pages deliberately subclassed) would be passed to the framework. (Sorry, I'm a bit rusty on this and have my head in a VFP bucket at the moment so I may be missing something (or a lot<s>)
>
>I would prefer to do it in global.asax as it would allow me to have it all in the same place.

OK. Don't know enough about your framework. Just thought that at the moment your code in the PreRequestHandler is going to have to decide whether to interact with the framework. If you relied on code in your own classed page then only those pages would be handled by the framework...

Best,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform