Allow access for unathenticated users to specific page using ASP.Net Forms Authentication

后端 未结 4 1578
渐次进展
渐次进展 2020-11-30 07:38

I am using ASP.Net Forms Authentication. My Web.config looks like this.

    
      

        
4条回答
  •  囚心锁ツ
    2020-11-30 07:45

    Allow everyone to access a particular page

    Sometimes you want to allow public access to some page and want to restrict access to rest of the site only to logged / authenticated users .i.e. do not allow anonymous access. Say your special.aspx is in your site's root folder. In the web.config of your website's root folder you need to have following setup.

     
        
    
        
    
              //this will restrict anonymous user access
           
    
       
        //path here is path to your special.aspx page 
       
       
         // this will allow access to everyone to special.aspx
    
     
     
     
     
    

提交回复
热议问题