Re: web.config in subfolder

From: Daren Hawes (newsgroups_at_webdesignmagic.com.au)
Date: 08/19/04


Date: Wed, 18 Aug 2004 18:52:02 -0700

Hi I have just done that...

Modify your web config like this below.

This will allwo Anon users into your wesite.

   <authentication mode="Forms">
    <forms loginUrl="Agents_Login.aspx" name="sqlAuthCookie"
timeout="60" path="/" protection="All">
    </forms>
    </authentication>
<authorization>
<allow users="?" />

</authorization>

Now add this just after the last section of the config file. This will
work.

  </system.web>
      <!-- Folder
          Deny access to this folder
    -->
     <location path="folder">
      <system.web>
        <authorization>
             <deny users="?"/>
        </authorization>
      </system.web>
   </location>

  
</configuration>

Thanks Daren

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Blocking Direct URL Access through web config
    ... I also have a web config ... The problem is when I paste the direct URL into the ... the browser, I can gain access to that page. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: authentication mode for specific files?
    ... the web config. ... I have an img tag to an image in ... config file to specify specific files that do not require ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Need help with denying access to a folder...
    ... In my web config I have this: ... the forum software that I am using is the old asp so ... Only the Best Freeware at http://www.vbmark.com ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Blocking Direct URL Access through web config
    ... I also have a web config ... The problem is when I paste the direct URL into the ... the browser, I can gain access to that page. ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast