Note that there are some explanatory texts on larger screens.

plurals
  1. POAdditional code required when developing custom visual web part for anonymous access?
    primarykey
    data
    text
    <p>I have a simple custom web part with three drop downs that reads from three different list. When the user tries to access this page they get prompted for password, if they don't enter any credentials they get a 401 error.</p> <p>I have enabled anonymous access both in central admin and on the site itself, users can browse to the site and view it without getting prompted for password. I have made sure that anonymous user have "view" access to the lists in questions but they still can't view any page with a custom web part.</p> <p>So is it a SharePoint setting or do I have to add something in my web part projects?</p> <p>Thanks in advance.</p> <p>Edit:</p> <p>I call this method in page load and still get the same error</p> <pre><code>private void LoadImageGallery() { SPSecurity.RunWithElevatedPrivileges(delegate() { SPSite oSiteCollection = SPContext.Current.Site; SPWebCollection collWebsites = oSiteCollection.AllWebs; DataTable dt = new DataTable(); for (int i = 0; i &lt; collWebsites.Count; i++) { using (SPWeb oWebsite = collWebsites[i]) { if (oWebsite.Title == "People") { SPList peopleList = oWebsite.Lists["Pages"]; if (peopleList != null) { SPListItemCollection collListItems = peopleList.Items; dt = collListItems.GetDataTable(); // Include Surname to omit default/search page dt = collListItems.GetDataTable(); rptImageGallery.DataSource = dt; rptImageGallery.DataBind(); } } } } }); } </code></pre> <p>I also tried with</p> <pre><code>SPSite oSiteCollection = SPContext.Current.Site; SPWebCollection collWebsites = oSiteCollection.AllWebs; </code></pre> <p>above runwithelevated..</p> <p>I set system\sharepoint to have full control in the entire site</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload