Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protection of specific files in local
Message
From
06/07/2006 13:10:53
 
 
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:
01134203
Views:
17
>I said Web.config not Machine.config.
>In my C:\WINNT\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config I see
>
><httpHandlers>
>    <add path="*.config" verb="*" type="System.Web.HttpForbiddenHandler" validate="True" />
>....
></httpHandlers>
>
>
>That's the line I suggested you would neeed to remove.

Ok, I was not aware there was also a web.config file at that level. Well, without changing anything in there, I would achieve want I want if I would comment some lines in the global.asax file. The problem is that file is conflicting with the web.config settings. Here is the global.asax file:
<object id="LXFramework" runat="server" class="Framework.Framework.App" scope="Application" />

<script runat=server>

    Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        LXFramework.nApplicationMode = 3
        LXFramework.oServer = Server
        LXFramework.Initialize()
    End Sub

    Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
        LXFramework.oRequest = Request
        LXFramework.oResponse = Response
        LXFramework.oServer = Server
        LXFramework.BeginRequest()
    End Sub
    
    Sub Application_EndRequest(ByVal sender As Object, ByVal e As EventArgs)
        LXFramework.oResponse.Write(LXFramework.GetJavascriptMessage)
        LXFramework.EndRequest()
    End Sub

    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
        LXFramework.ErrorSetup()
    End Sub

    Sub Application_PreRequestHandlerExecute(ByVal sender As Object, ByVal e As EventArgs)
        Dim loPage As System.Web.UI.Page = Context.Handler
        LXFramework.oPage = loPage
    End Sub
   
</script>
Basically, if I comment the lines in the BeginRequest(), EndRequest(), Error() and PreRequestHandlerExecute() events, when a user pulls out the web.config or a .vb file such as account.aspx.vb, the server will return the proper message which is "This type of page is not served.". This is what I want. However, I really need to have global.asax to be defined as is. What happens is those events take priority over the web.config and they try to process the file. Do you know what I need to do in order to have the web.config to have priority?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform