.NET King Logo Comments on: Anonymous access for SharePoint 2010 application pages
Skip Navigation Links
Home
Weblog
How to... (video)
Articles
About us
Contact us
0 Items in Video cart!

Anonymous access for SharePoint 2010 application pages (12/14/2011)

Problem: We would like to create an application page that doesn't require login and any user can open that.

1. Make sure the website that calls the application page is available for anonymous access.
If the URL to the application page is http://server01/_layouts/testpage.aspx, then http://server01/ has to be accessible by anonymous user.

2. When you create an application page in Visual Studio 2010, by default when you open the page in view code, you see the class below:

public partial class testpage : LayoutsPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}

LayoutsPageBase by default fires the login prompt. So just replace it with equivalent class that can be called in an unsecure context. That class is UnsecuredLayoutsPageBase.

So your code should look like this.

public partial class testpage : UnsecuredLayoutsPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}

3. UnsecuredLayoutsPageBase has a read-only property called AllowAnonymousAccess. This property returns false by default which leaves you with an extra step to override it and make it return true. So your final code will look like this:

public partial class testpage : UnsecuredLayoutsPageBase
{
    protected override bool AllowAnonymousAccess
    {
        get
        {
            return true;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}

Deploy the page and enjoy opening the page without login prompt.

OK, I have done this but it still prompts me for the login info! Well the only other thing that I can think about now is go to the site settings and make sure the master page as a published and approved version.

Note: All the credit of this post goes to Dr. Zewei Song and Kevin Chen. I have just packaged and formatted their work.  

Cheers
Alireza


By: Lain  
cheap youth football jerseys.Shop for cheap youth football jerseys with fast free shipping and great service wholesale jerseys china us from china factory,cheap nike nfl jerseys online sale!
URL: http://h8fomento.com.br/wp/index.php/2012/03/18/round-for-casino-games/  
By: Gersten  
Where to buy cheap jerseys china vip? Come
here. best cheap jerseys from china
URL: https://logosensei.com/2013/02/27/irelands-warrior-lies-in-repose-with-an-emperor/  
By: Odoms  
Great place to order cheap mlb jersey by Paypal.

jerseys for cheap
URL: http://onlinesusansmoss.com/wp/2012/08/03/right-after-between-married-and-cohabiting-couples/  
By: Beeson  
Ebay same style cheap stitched nhl jerseys to offer.

Online free shipping - wholesale nhl jerseys free shipping
URL: https://tagsoffluggage.com/?p=205  
By: Maloney  
Who do you want to gift for cheap jerseys youth? Get value into
the page: wholesale jerseys nba
URL: http://kubokiworld.com/wp/index.php/2013/03/24/season-testing-in-the-capital-from-salisbury-journal/  
By: Dortch  
excellent publish, ѵery informative. I wonder why
the opposite specialists of thus sector do not notice this.
You must continue your writing. I'mconfident, you've a great readers' base alreaԁy!
URL: http://cheatsociety.com/8-ball-pool-hack-unlimited-coins-cash-cheats/  
By: Price  
good wholesale websites Amazon Shopper online retail,with
link: nfl shop cyber monday coupon code
URL: http://www.ybeauty4life.com/says-jets-gm-mike-tannehexinci2um/  
By: Forehand  
How to get wholesale jerseys nhl? Tips you may
used. china cheap jerseys wholesale
URL: http://nkvel.com/wp/index.php/2014/05/01/daily-very-high/  
By: Kimpton  
Who do you want to gift for softball jerseys for cheap?
Get value into the page: cheap nike from china
URL: http://agape.com.ph/wp/2011/01/17/9-wings-jersey-the-very-first-time-in-his-life/  
By: Pfaff  
cheap sports jerseys china Amazon Shopper online retail,with link: cheap nhl
jerseys from china free shipping
URL: http://celanalegging.net/wp/2013/11/24/manly-sea-eagles-v-canterbury-bulldogs/  
By: Waldo  
How to get wholesale jerseys game? Tips you may used.
wholesale jerseys grey
URL: http://nomis.asia/2014/02/15/formula-one-profits-stuck-in-the-slow-lane/  
By: Estep  
How to get wholesale Luke Bowanko jerseys? Tips you may used.
jerseys com
URL: http://ashamautorepair.com/500k-beyond-wholesale-kids-jerseys-process-cancer-appeal/  
By: Bullen  
An inteгesting discussion іs wordth comment. I do think that you ought to publish more about this subject, it may not
be a taЬoo matter but typically people don't sреak abbout such topics.
To tthe next! Αll the best!!
URL: http://cheatsociety.com/8-ball-pool-hack-unlimited-coins-cash-cheats/  
By: Moreau  
cheap Brandon Graham jerseys Amazon Shopper online retail,with link: cheap T.

J. Jones jerseys
URL: http://wwww.psdteam.com/?p=332  
By: Chu  
If you are going for finest contents like myself, simply visit this web
page every day since it offers quality contents, thanks
URL: http://ow.ly/yFUL30daJQN  
By: Criswell  
How to get cheap nfl jackets? Tips you may used.
custom hockey team jerseys
URL: http://www.sistrattamentoacque.it/7-crazy-stories-about-twins-that-will-have-you-asking/  
By: Leavens  
Hi! TҺis iss mу first visit to your blog! We are a team of
olunteers and starting a neա projᥱct in а community
iin tһe samᥱ niche. Your blog provided us valuable informɑtion to ԝork on. You have done a
wonderful job!
URL: http://cheatsociety.com/8-ball-pool-hack-unlimited-coins-cash-cheats/  
By: O'Haran  
Hi there mates, how is all, and what you would like to say about this
post, in my view its truly amazing for me.
URL: http://ow.ly/hZ3r30daKUh  
By: Midgett  
Vᥱry shortly this web site will Ьe famous among all blogging
peoplе, due to it's pleɑsant content
URL: http://cheatsociety.com/modern-combat-5-hack-cheats-free/  
By: Hebert  
cheap jerseys from china free shipping.32 Eric Rowe Jersey for sale, supply usa cheap chinese jerseys free shipping with paypal also free
gift can get.
URL: http://smart-energy.com.pk/wp/2012/09/07/tax-on-pension-moves-with-you/  
By: nfl authentic jerseys cheap  
I think this is among the most important information for me. And i'm happy reading your article. But want to statement on few basic things, The website taste is wonderful,postcheap jerseys the articles is really great D.Excellent activity, cheers
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: replica nfl jerseys china  
Hi there, just became aware of your blog through Google, postcheap jerseysand found that it's really informative cheap nfl jerseys. I am gonna watch out for brussels. I will be grateful if you continue this in future. Numerous people will be benefited from your writing. Cheers!
URL: http://www.fnq.qc.ca/bannieres/nikenfljerseys.html  
By: cheap replica nfl jerseys  
I do agree with all of the ideas you have presented in your postwholesale nfl jerseys. They're really convincing and will certainly work. Still, the posts are very short for novices. Could you please extend them a little from next time? Thanks for the post.
URL: http://www.araq.net/pic/cheapnikenfljerseys.html  
By: nfl authentic jerseys cheap  
Thanks for the auspicious writeup. It in reality was once a entertainment account it. Look advanced to more introduced agreeable from you! By the way, how could we communicate?
URL: http://www.karatequebec.com/pic/equipe2.asp  
By: cheap nfl football jerseys wholesale  
Hi there, simply become alert to your blog through Google, and found that it is really informative. I am gonna watch out for brussels. I will appreciate when you continue this in future. A lot of folks can be benefited from your writing. Cheers!
URL: http://www.rinace.net/main.html  
By: custom nfl replica jerseys  
Hello there, just became aware of your blog through Google, postwholesale nfl jerseysand found that it is truly informative cheap nfl jerseys. I am going to watch out for brussels. Il appreciate if you continue this in future. Many people will be benefited from your writing. Cheers!
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: kids nfl jerseys cheap  
Thanks for the auspicious writeup. It actually was a leisure account it. Glance advanced to far brought agreeable from you! By the way, how could we keep up a correspondence?
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: cheap custom nfl jerseys  
We're a group of volunteers and starting a new scheme in our community. Your site offered us with valuable info to work on cheap nfl jerseys china. You have done an impressive job and our whole community will be grateful to you.
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: cheap wholesale nfl jerseys china  
Pretty section of content. I just stumbled upon your website and in accession capital to assert that I acquire in fact enjoyed account we supply cheap nfl jerseys your blog posts. Any way I will be subscribing to your feeds and even I achievement you access consistently quickly.
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: cheap nfl custom jerseys  
hello there and thanks in your information ?I definitely picked up anything new from proper here postcheap nfl jerseys china. I did however experience several technical points the usage of this web site, as I skilled to reload the site lots of instances previous to I may just get it to load properly. I had been brooding about if your web host is OK? Now not that I am complaining, but slow loading cases instances will sometimes affect your placement in google and can damage your high quality rating if advertising and ****|advertising|advertising|advertising and *** with Adwords. postcheap jerseysAnyway I am including this RSS to my e-mail and can look out for much extra of your respective intriguing content. Make sure you replace this once more soon.
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: jerseys nfl wholesale  
Thank you for another excellent post. Where else could anybody get that type of information in such a perfect way of writing? I've a presentation next week, and I am on the look for such information.
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: cheap nfl football jerseys  
Discover what's the deal with ingbacks? According to Wikipedia, WP supports automatic pingbacks where all the links in a published article can be pinged when the article is published?we supply cheap nfl jerseys That explains why I get messages about new comments? when posting an edit that cross-references another post of my own. Info on trackbacks and pingbacks in WP here.
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: wholesale nike nfl jerseys  
I think this is among the such a lot important info for me. And i am glad studying your article. However want to observation on some general things, The web site taste is wonderful,postcheap nike nfl jerseys the articles is actually excellent D.Excellent job, cheers
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: nfl authentic jerseys wholesale  
Very nice post. I just stumbled upon your blog and wished to say that cheap nfl jerseys china I have really enjoyed browsing your blog posts. In any case Il be subscribing to your feed and I hope you write again soon!postcheap nike nfl jerseys.
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: authentic nike elite nfl jerseys wholesale  
A person essentially assist to make critically articles I would state. postwholesale nfl jerseysThis is the very first time I frequented your web page and so far? I surprised with the research you made to make this actual post amazing. Wonderful job!
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: nfl jerseys cheap  
I been exploring for a little bit for any high-quality articles or blog posts on this kind of area postcheap nfl jerseys. Exploring in Yahoo I at last stumbled upon this website. Reading this info So i am happy to convey that I've a very good uncanny feeling I discovered exactly what I needed. I most certainly will make certain to don't forget this site and give it a look on a constant basis.
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: cheap elite nfl jerseys  
Attractive section of content. I just stumbled upon your web site and in accession capital to assert that I get in fact enjoyed account we supply cheap nfl jerseys your blog posts. Anyway I will be subscribing to your feeds and even I achievement you access consistently fast.
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: bills all red jerseys  
Discover what's the deal with ingbacks? According to Wikipedia, WP supports automatic pingbacks where all the links in a published article can be pinged when the article is published?we supply cheap nfl jerseys That explains why I get messages about new comments? when posting an edit that cross-references another post of my own. Info on trackbacks and pingbacks in WP here.
URL: http://www.usacheapnfl.com/buffalo-bills-c-561_987_24133/  
By: new york jets new jersey  
I'm extremely impressed with your writing skills postcheap nfl jerseys china and also with the layout on your blog with cheap nfl jerseys. Is this a paid theme or did you customize it yourself? Either way keep up the nice quality writing, it rare to see a great blog like this one today
URL: http://www.usacheapnfl.com/new-york-jets-c-561_987_24162/  
By: customized nfl shirts  
I do agree with all the ideas you've presented in your postcheap nfl jerseys. They are very convincing and will certainly work. Still, the posts are very short for starters. Could you please extend them a little from next time? Thanks for the post.
URL: http://www.egaleaction.com/wholesalejerseys.asp  
By: personalized nfl replica jerseys  
Somebody necessarily lend a hand to make seriously posts I'd state. postcheap nfl jerseys chinaThat is the first time I frequented your website page and thus far? I amazed with the analysis you made to create this particular post extraordinary. Excellent activity!
URL: http://www.rinace.net/main.html  
By: best cheap nfl jerseys  
relationships with other bloggers. Check out this extremely well-written trackback tutorial Permalink,we supply cheap nfl jerseys.
URL: http://www.rinace.net/main.html  
By: discount nike nfl jerseys  
Thanks for the auspicious writeup. It in truth was a enjoyment account it. Glance advanced to far delivered agreeable from you! However, how could we be in contact?
URL: http://www.karatecanada.org/pics/new.html  
By: buffalo bills jersey red  
Pretty section of content. I just stumbled upon your web site and in accession capital to assert that I acquire in fact enjoyed account we supply cheap nfl jerseys your blog posts. Any way Il be subscribing to your feeds and even I achievement you access consistently quickly.
URL: http://www.usacheapnfl.com/buffalo-bills-c-561_987_24133/  
By: nfl stitched jerseys cheap  
In the WordPress support forum, there are from time to time questions abut trackbacks. I haven't used it myself, but I found a good tutorial on the OptiNiche cheap nfl jerseys china blog.
URL: http://www.fnq.qc.ca/bannieres/page.html  
By: cheap nfl jerseys china wholesale  
In the WordPress support forum, there are from time to time questions abut trackbacks. I haven't used it myself, but I found a good tutorial on the OptiNiche cheap nfl jerseys china blog.
URL: http://www.araq.net/pic/cheapnikenfljerseys.html  
By: cheap nfl nike jerseys china  
Hi there, simply changed into aware of your blog thru Google, and found that it's really informative. I am going to be careful for brussels. Il appreciate should you continue this in future. Lots of people might be benefited out of your writing. Cheers!
URL: http://www.usacheapnfl.com/nfl-jerseys-c-561/  
By: cheap nike nfl jerseys from china  
I have been exploring for a little for any high quality articles or blog posts on this kind of area post. Exploring in Yahoo I at last stumbled upon this website. Reading this information So i am happy to convey that I've a very good uncanny feeling I discovered just what I needed. I most certainly will make sure to do not forget this web site and give it a glance regularly.
URL: http://www.usacheapnfl.com/nfl-jerseys-c-561/  
By: wholesale cheap nfl jerseys supply from china  
I will immediately postwholesale nfl jerseys seize your rss as I can't find your e-mail subscription hyperlink or newsletter service. Do you have any? Please allow me realize in order that I may subscribe. Thanks.
URL: http://www.usacheapnfl.com/nfl-jerseys-c-561/  
By: authentic nike elite nfl jerseys wholesale  
In the WordPress support forum, there are from time to time questions abut trackbacks. I haven't used it myself, but I found a good tutorial on the OptiNiche cheap nfl jerseys china blog.
URL: http://www.usacheapnfl.com/nfl-jerseys-c-561/  
By: nike nfl jerseys wholesale  
Hello there, just became aware of your blog through Google, postwholesale nfl jerseysand found that it is really informative cheap nfl jerseys. I am going to watch out for brussels. I will be grateful if you continue this in future. Lots of people will be benefited from your writing. Cheers!
URL: http://www.usacheapnfl.com/nfl-jerseys-c-561/  
By: cheap nike nfl jerseys  
relationships with other bloggers. Check out this extremely well-written trackback tutorial Permalink,we supply cheap nfl jerseys.
URL: http://www.usacheapnfl.com/olympic-hocky-c-144_1007_170/  
By: Canada  
Thanks for your write-up. What I want to point out is that while looking for a goo internet electronics
shop, look for a website with comprehensive information on critical indicators such as the personal privacy statement, securityy details, any payment procedures, and other terms in addition to policies.
Constantly take time to look into the help along with FAQ areas to get
a far better idea of how a shop functions, what they are capable of doing for you, and
just how you can mske use of the features.
URL: http://thenewapartmentdevelopments.pen.io/  
By: Nation  
Can I just say what a reduction to find somebody who truly knows what theyre speaking about on the internet.
You definitely know the way to bring a difficulty to gentle and make it important.
Extra individuals need to learn tbis and perceive this aspect
oof the story. I cant imagine youre no more common because you undoubtedly
have the gift.
URL: http://artforartsake.tumblr.com/  
By: best supplier of nba mt coins  
You're very eloquent.
URL: http://www.u4nba.com/  
By: Buy NBA 2K17 MT  
This is really a nice place.
URL: http://www.flamegrove.com/blogs/post/52816  
By: cheap NBA 2K17 MT PS4 for sale  
No one can do it better than you.
URL: https://www.easy-coding.de/blog/Entry/8460-Customization-Your-NBA-2K17-MyCareer-Mode/  
By: fut 17 coins  
I respect your work.
URL: http://www.oracleug.com/forum/inventory/guide-fifa-17-web-app-troubleshooting  
By: coins fifa 17  
What is with that guy?
URL: http://www.kyhorsepower.com/forum/general-discussion/gaming-and-electronics/1549386-fifa-17-skills-guide  
By: NBA 2K17 MT  
I've been through this!
URL: http://chatchatty.com/blogs/206/1308/u4nba-best-place-to-buy-cheap-ps4-xbox-one-pc-nba-2k17-mt  
By: buy cheap fifa 17 coins  
i'm able to discover many great solutions basically have any trouble!
URL: http://someda.co/forum/discussion/12878/what-is-fifa-17-motm-orange-cards  
By: buy cheap NBA 2K17 MT  
Too bad we must return them.
URL: http://nba2kspot.mex.tl/blog_free-nba-2k17-demo-open-your-career-mode.html  
By: fifa 17 coins  
Do you have a good sense of humor .
URL: http://templatedevelopers.grou.ps/talks/7729820  
By: cheap fifa 17 coins  
I have no idea what you have said
URL: http://somdmda.org/will_fifa_17_have_womens_team  
By: cheap fifa 17 points  
Thank you for your helping hand.
URL: http://carpetarota.com/blogs/37415/146031/three-high-profile-players-rating-in-fifa-17  
By: Albion Online Gold  
I do not know what you are saying
URL: http://www.facecool.com/profiles/blogs/the-innovation-of-albion-online  
By: u4fifa  
I was wondering if after work we could grab a cup of coffee
URL: http://www.brownbook.net/business/40530460/u4fifa  
By: coach factory outlet  
crucial thing shall be working in honest good faith.
URL: http://www.coachfactoryonlines.us.org/  
By: black ray ban aviators  
I the issue is one thing that not enough persons are talking intelligently about. I am very pleased that I stumbled across this in my seek for one thing referring to this.
URL: http://www.raybanoutletss.com/  
By: michael kors factory outlet  
With you (not that I actually would want . You definitely put a brand new spin on a topic thats been written about for years. Nice stuff, simply nice!
URL: http://www.discountmichaelkorsbags.org  
By: buy Blade and Soul gold  
i'm able to find many great answers basically have any trouble!
URL: http://guitarzone.ca/blogs/post/7970  
By: ray ban aviators sale  
It's highly helpful for me. Large thumb up for this blog post!Pls check out my website as well and let me know what you think.
URL: http://www.raybanoutletss.com/  
By: cheap oakleys  
An interesting dialogue is price comment. I feel that you should write more on this matter, it won't be a taboo subject but typically individuals are.
URL: http://www.oakley-sales.org/  
By: cheap ray ban sunglasses  
Post thanks for share. more wait .. ?
URL: http://cheapraybans.outletonlinestores.net/  
Your name:
Email:
URL:
Comments:
 

 -