Home » Sharepoint 2010RSS

Anonymous access to Application page

Hi All,

I added an application page to one of my sharepoint projects. And inherited from unsecuredlayoutspagebase.

But I am not able to get anonymmous access to that page.  It still prompts for user name and password .

Can anyone point me to right direction.

 

Thanks

Julie

 

2 Answers Found

 

Answer 1

Hi Julie,

you need to add to your web.config:

<locationpath="<strong>_layouts/pathtoyourapplicationpage/yourapplicationpage.aspx</strong>"><system.web><authorization><allowusers="*"/></authorization></system.web></location>

You will allready find another entry for _layouts/images in your web.config. <allow users="*"> Define that ever user has access even if not authorized and.
There is a good knowledgebase article which describe this: http://support.microsoft.com/kb/316871

Regards Stefan

 

Answer 2

Hi Julie

 

you need to override the AllowAnonymousAccessproperty and return true see the following code\

protectedoverridebool AllowAnonymousAccess 
{     
 get
 {        
   returntrue;      
  }  
}
Good Luck

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter