.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Custom Web Part doesn't work with in anonymous access

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :SharePoint
Hi there, I have a custom webpart in a farm solution deployed to my site. Anonymous users should be able to view the site, however they can't because they are required to login due to the custom web part. If i remove the webpart from the page, anonymous users can view the site perfectly without the need to login. There is nothing really special about the webpart. It's a visual web part which uses the site and it's web data to display a sort of menu. Any idea? Thx in advance! Brecht

View Complete Post

More Related Resource Links

Web Part Doesn't work with in anonymous access in Sharepoint 2010


I built a site in sharepoint2010 with anonymous access , on one of its page it has simple Visual Web part.

but anonymous access , am unable to c the webpart.

if i sign in , i can c the webpart?

Any thoughts?

Thanks in Advance!

Share Knowledge and Spread Love!

Custom field type - set value doesn't work when field is hidden

Hi, I have a simple custom field type which gets a value from the Property Bag and sets that value to a label. This works fine as long as the field is set to Optional (the field is a site column and is part of a site content type), but if I set it to Hidden, the value doesn't get set. public override void UpdateFieldValueInItem()         {             this.EnsureChildControls();               if (this.ControlMode == SPControlMode.New)             {                 this.Value = GetChosenConsole();             }         }   Does anyone know why this is and what I need to do in order for it to work even though it's hidden? Thanks!

XML Viewer web part and SharePoint list RSS feed doesn't work

Hello, When I want to use the XML Viewer web part and set the XML URL to an RSS feed from a SharePoint list I get this error: Cannot retrieve the URL specified in the XML Link property. For more assistance, contact your site administrator. The URL I'm trying looks like this: http://sp2010/_layouts/listfeed.aspx?List=%7B76FD9EEE%2D9354%2D444E%2DBE3C%2DA9AE2C4B2063%7D I've seen blogpost that discuss this and they say that this is because of a security issue and that I have to enable anonymous access in order to display the RSS feed. Is this the only option there is ? I don't want to enable anonymous access on my SharePoint site. Why can't SharePoint just request the RSS feed with the credentials of the logged in user ? Or am I missing something here?

Anonymous access on Excel Viewer web part for a no access .xslx file?

I have a public facing SharePoint 2010 Enterprise website with anonymous access enabled. I'd like to present information (a pivot chart) from an .xslx file using the Excel Viewer Web Part. It works fine when I place the .xslx file in a document library that the anonymous users can access. I would, however, like to remove anonymous access from the .xslx file and only expose the chart from the .xslx file using the Excel Viewer web part. When I alter the library permissions to remove anonymous access to the library that holds the .xslx file, the Excel Viewer web part displays an "Access Denied" message to the anonymous user. Is there some other way to achieve this?

Anonymous access - User prompted for login after click in web part area

I have a MOSS2010 site, internet-facing using anonymous access. I've found workarounds to many of the anonymous access issues I've come across, but I don't know how to fix this one. Any ideas or assistance would be appreciated. A user visits one of my pages with a OOB webpart. If they click within the area for that web part, essentially selecting the web part, it prompts for a login. I don't want my users getting prompted for a login, but I don't know why they're being prompted in the first place. According to the logs, it looks like it is trying to access _layouts/wpribbon.aspx. They aren't clicking on the items (titles aren't clickable), it's the area within the web part box. Can I make that area non-clickable?? Go to: www.carlile.biz/careers/pages/current-openings.aspx Click on the area around the Locations or the Current Openings listed. Either will prompt for a login. Even with a valid login, the view does not change and no further options are presented.

WPF Custom Control template doesn't work



I've created a WPF custom control that goes in a DLL and I'm trying to use the control in another project.  Everything works fine except for the part of getting the control template to work. I should get an Orange background as defined below but the control just shows empty in the XAML editor and in runtime.

The code is as follows:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace MyCustomControl
    public class CustomCtrl : System.Windows.Controls.Control
        public static readonly System.Windows.DependencyProperty ValueProperty;
        public string Value
            get { return (string)GetValue(CustomCtrl.ValueProperty); }
            set { SetValue(CustomCtrl.ValueProperty, value); }

        static CustomCtrl()

Inconvenient SharePoint 2010 Content Query Web Part and Anonymous Access


Morning every one

I am hoping some one has found a work around regarding this.

I am using a JQuery random 'quote' generator (http://nextconnect.blogspot.com/2009/12/jquery-random-quote-viewer.html) in my site.I have enabled full anonymous access. My issue is that it still prompts you for the login in order to see the quote generator. I have tried the "ViewFormPagesLockDown" fix but it isn't even activated on my site. And now I am at a complete loss. I did some googling (Read 5 hours) and it seems that in Sharepoint 2010 doesn't have a work around for this and I am really hoping I am wrong.


Any ideas?


Have a great friday :)


My custom role provider doesn`t work


Hi guys.

Have a little problem. I`ve developed my custom role provider to have my implementation of it logic. But during the process i have a problem with this.

I implemented class CustomRoleProvider:

namespace CSSA
    public class CustomRoleProvider : RoleProvider
        public override string ApplicationName
            get { return "xxx"; }
            set { }

        /// <summary>
        /// Add roles to users.
        /// </summary>
        /// <param name="usernames">list of member which need to accept roles</param>
        /// <param name="roleNames">The list of role, which will be apply to user List</param>
        public override void AddUsersToRoles(string[] usernames, string[] roleNames)
            throw new NotImplementedException();

        public override void CreateRole(string roleName)


        public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
            return true;

        public override string[] FindUsersInRole(string roleName, string usernameToMatch)
            throw new NotImplementedException();

        public override string[] GetAllRoles()

SharePoint 2010 Anonymous Access or work around

I have found the necessary steps to permit anonymous access; however, it does not seem to work with a site running off of Central Administration (I am guessing there is a security feature that does not allow this).  Is there a way to grant anonymous access to a site running under the CA web app?  If not, is there a way, in the user permissions to a particular site, to grant access to anyone that tries to access?  

Search does not work with anonymous access



I am having trouble getting search to work with anonymous access. I found a thread saying that search is disabled by default with anonymous access for security purpose and followed their instruction to enable search for anonymous access. But it doesn't work. http://prequest01.wordpress.com/2008/10/02/search-does-not-work-with-anonymous-access/

When I say search doesn't work, I mean that it doesn't return any search results if with anonymous access. However, if I try the same search keyword with admin account. I can get search results. For example, a simple keyword "welcome" would return the homepage as one of the search results if logged in with admin account.

My other question is whether search is supposed to index documents as well. I tried to upload a couple of documents via Document Center and performed a full crawl. However, I am not able to search these documents via their document name even if I'm logged in with admin account.

Any help is much appreciated!

Zhiyun Qian

Anonymous Access - Web Part Pages with Web Part Connections

Basically, I have a SharePoint Foundation site I'm building out with lots of lists and libraries being related with lookup columns and metadata.  After getting everything setup and all my items associated with the proper metadata, I created a web part page.  On this page, I put each of my associated lists/libraries with special views to optimize screen usage.  Lastly, I connected them all with web part connections - they all are filtered by the main web part.  The filter works wonderfully, and I can browse to it with an authenticated user, but anonymous users get a Windows prompt every time.

- On the web app, I have no policy set for Anonymous Users, and Anonymous Access ie enabled
- On the Site Collection, Anonymous Users allowed to see the "Entire Web Site"
- On the Site Pages library, Anonymous Users have the "View Items" permission
- On every page, list, and library in the site, Anonymous users have access and can see data except my one page with web part connections
- In the Site Pages library, Anonymous Users can see the page shown as a file
- If I remove all web part connections, then the Anonymous User no longer gets prompted and can see the page

Here is the version of the page without web part connections:


Foundations: Adding Code Access Security to WCF, Part 2


This month's column continues the discussion around code access security in WCF and partially trusted services.

Juval Lowy

MSDN Magazine July 2008

Foundations: Code Access Security in WCF, Part 1


Here we discuss code-access security in Windows Communication Foundation (WCF) and present a solution for enabling partially trusted clients for WCF services.

Juval Lowy

MSDN Magazine April 2008

C++ at Work: Event Programming, Part 2


Last month I answered a question about implementing native events in C++ (see C++ At Work: Event Programming). I discussed events in general and showed how to use an interface to define event handlers for your class that clients must implement to handle events.

Paul DiLascia

MSDN Magazine March 2006

Data Points: The Enterprise Library Data Access Application Block, Part 3


E nterprise applications can have a wide variety of data update requirements. Sometimes you need to save multiple rows of changes at once within a single transaction. Other times, the user must be allowed to enter multiple rows of data, send them to the database in a batch; and if a row or two fails, only the rows that succeeded should be committed and remain committed.

John Papa

MSDN Magazine October 2005

Data Points: The Enterprise Library Data Access Application Block, Part 2


Last month I explored the foundation of the Enterprise Library Data Access Application Block (DAAB) including how it all fits into an architecture (see Data Points: The Enterprise Library Data Access Application Block, Part 1).

John Papa

MSDN Magazine August 2005

Data Points: The Enterprise Library Data Access Application Block, Part 1


A solid data access later (DAL) can benefit an application by hiding redundant tasks, helping handle exceptions more gracefully, helping clean up resources more efficiently, and providing a layer of abstraction from the database.

John Papa

MSDN Magazine July 2005

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend