><httpHandlers> > <add path="*.config" verb="*" type="System.Web.HttpForbiddenHandler" validate="True" /> >.... ></httpHandlers> >>
<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?