Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protection of specific files in local
Message
From
12/07/2006 03:34:31
 
 
To
11/07/2006 11:20:35
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:
01135584
Views:
19
>Thank you, this works:
>
>
>    Sub Application_PreRequestHandlerExecute(ByVal sender As Object, ByVal e As EventArgs)
>        Dim loContext As Object = Context.Handler
>        Dim loType As Object = loContext.GetType()
>        Dim lcType As String = loType.ToString
>
>        ' .vb and .config not accepted
>        If lcType = "System.Web.HttpForbiddenHandler" Then
>            Response.Redirect("Default.aspx")
>        End If
>
>        Dim loPage As System.Web.UI.Page = Context.Handler
>        LXFramework.oPage = loPage
>    End Sub
>
Pity VB needs to be so verbose<s>. But you can get rid of the first three lines:
If (CType(Context.Handler, Object)).GetType().ToString() = "System.Web.HttpForbiddenHandler" Then
See you've resolved the other problem as well...
Regards,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform