Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Protection of specific files in local
Message
De
07/07/2006 11:18:08
 
 
À
07/07/2006 10:12:45
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01133718
Message ID:
01134475
Vues:
22
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform