restrict access to application in web.config

Discussion in 'ASP.NET 2.0' started by andrewdiscountasp, Nov 28, 2008.

  1. Just wondering if there was anyway you could restrict access to an application (folder made into an application in control panel) using something like a web.config file that looks at the servervariables("SERVER_NAME") for a match to a string, if it matches, then access i given and u can browse the pages. otheriwse, it just redirects user to an error page?

    or a global.asax file at the root?

    cheers[​IMG]
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Putthe logic inglobal.asax's Application_BeginRequest function (in the application root).

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page