Tag Info

Hot answers tagged

10

From your code it would seem that you are trying to set a web-application property from a site collection scoped feature. If you are using SharePoint 2010, I can assume that you are experiencing the effect of the new "RemoteAdministratorAccessDenied" security setting, which among the others by default block any attempt to alter a web app property from a ...


7

Your issue is related to access to Configuration Database. Please follow the link for details - http://blog.falchionconsulting.com/index.php/2009/07/custom-sharepoint-2007-site-collection-creation-page/. It describes the same issues with creation of site collection and possible solutions and also touches Timer Job.


6

The scope of your problem may range between the ones that are mentioned below. Have them carefully checked. Master page or the Page Layout used by the home page are being checked out by Site Collection Admin or is lying in "pending" approval state. Any custom solution that might be added in the landing page can cause access issues. Verify closely the uls ...


5

RunWithElevatedPrivileges requires its own SPWeb. If you reuse a existing SPWeb, you won't run elevated, but with the initial context. A common approach applied to your code can be : public class MyProvisioningProvider : SPWebProvisioningProvider { // <summary> // Gets called when a web is provisioning when the template // chosen has ...


4

I believe that with the constructor you are using, the last three properties need the SPUser.LoginName, SPUser.Name, and SPUser.Email. I've had trouble with site creation code in the past when these parameters were not correct. Any reason why you are not capturing the actual exception in the catch block?


4

You could open the site with the SystemAccount token. It is more recommended than using SPSecurity.RunWithElevatedPrivileges. I would do it like this: private void LoadSubsites() { using (SPSite site = new SPSite(SPContext.Current.Web.Url, SPUserToken.SystemAccount) { using (SPWeb web = site.OpenWeb()) { var sites = web.Webs.Select(w => ...


4

Solved! Though I'm still not certain why it occurred on this site and on no others... I simply had to provide global read access to the master page library. Site actions > site settings > Master Page and page layouts > Library tab > Permissions. Add All authenticated users to READ ONLY.


3

customer.Collaboration.Provisioning.SPI.EventReceivers.ProjectProvisioningEventReceiver.ProjectProvisioningEventReceiver.ItemAdded(SPItemEventProperties properties) This means that your ItemAdded Receiver for ProjectProvisioning feature fails. It will report site creation as failed because it rolls back and throws an exception. Take out all custom ...


3

My guess is one or more Site Collections are in one of the following states: Adding Content Prevented Read-only No Access See http://technet.microsoft.com/en-us/library/cc263238%28office.12%29.aspx for instructions to unlock.


3

I have fixed the issue by running Powershell command and site is working fine now. $wa = Get-SPWebApplication -Identity "http://intranet.mysite.com" $wa.Properties[" portalsuperuseraccount"] = "i:0#.w|pro1766\sp_superuser_cache" $wa.Properties["portalsuperreaderaccount"] = "i:0#.w|pro1766\sp_superreader_cache" $wa.Update()


3

I recommend you to read this and this blog posts. I am not sure about SP 2007, but in SP 2010 there is a property RemoteAdministratorAccessDenied (msdn page is not full of information, it's a pity). If this property setup to true, you can only update service from Central Admin pages, and if account, under code running has appropriate permissions. As blog ...


3

You might want to try turning off SharePoint's built in handling of AccessDenied exceptions which by default seem to cancel the current request and often causes ThreadAbortExceptions. SPSecurity.CatchAccessDeniedException Setting this property to false should allow you to handle the accessdenied exception yourself. Remember to restore its value once you ...


3

It sounds like you need to set permissions on the BCS entity. In Central Admin go to Application Management, then Manage Service Applications. Open the Business Data Connectivity Service and select your entity, then select Set permission from the context menu or click on the Set Object Permission button. Once you have permission to the entity the error ...


3

It is kept inside the current HttpContext. If you decompile the code you will see it: public static bool CatchAccessDeniedException { get { HttpContext current = HttpContext.Current; if (current == null) return false; string str = (string) current.Items[(object) "CatchAccessDenied"]; if (!string.IsNullOrEmpty(str)) return ...


3

You are most likely receiving this error because the group membership can only be modified by the group owner. If you open the Group settings page - you will see a setting that governs who can edit the group membership. There are two options; Group owner and Group members. In the object model it is governed by the Boolean property ...


2

If you haven't already done so, you may also need to add the dbcreator and securityadmin server roles to your user in SQL Server. Have you looked at the SharePoint logs (in the "12 hive") and the Windows Event Viewer on both servers already? They are helpful in diagnosing configuration issues.


2

It turns out that permission to the site collection master page gallery had been removed. So even though the users had permissions to the master page gallery on the subsite, they were getting access denied errors on the subsite. We're not sure how the permissions on the site collection master page gallery were removed.


2

I had the same problem in a similar scenario (had to list all the subsites). I rewrote my web part to use SPWeb.GetSubwebsForCurrentUser Method as it only lists the sites user is allowed to open. Maybe you should first retrieve subwebs and then check if /ManagementArea is on the list.


2

Have you tried removing your account from the group and granting those same permissions explicitly? If the error persists, does it go away when you elevate to full privileges? Other things you can try/verify: Clear your browser cache and delete your cookies. Ensure there are no web app rules that explicitly deny any rights. Check to ensure the DB where ...


2

It turns out that this is not a permission issue. The Shared Drive is set to FULL permissions for all users and the fine-grained permissions for the different folders are controlled with NTFS permissions. The "Access Denied" errors were actually thrown because of other issues with ifilters. Further investigation led to the following results: SharePoint ...


2

Have you verified that the portalsuperuseraccount and portalsuperreaderaccount properties of the web application are set to Claims-based account names? If they were set before the migration, they may still exist in a non-Claims encoded format. You can update these values through PowerShell: $wa.Properties["portalsuperuseraccount"] = "i:0#.w|domain\apppool" ...


2

First at all you should open new site context SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite(SPContext.Current.Site.ID)) { using (SPWeb web = site.OpenWeb(SPContext.Current.Web.ID)) { var sites = web.Webs.Select(w => new { Title = w.Title, Url = w.Url }); if ...


2

Common issue is: The web part is located on a page of subsite, and tries to retrieve data from '/_layouts/somefolder/somehandler.ashx'. But this url is the url of root site which user have not access to. In this case you should use '<%= SPContext.Current.Web.ServerRelativeUrl %>/_layouts/somefolder/somehandler.ashx' $.ajax({ url: "<%= ...


2

The problem is that I was trying to do the following inside the handler: SPSite siteColl = SPContext.Current.Site; var webs = siteColl.AllWebs; And that fails when a non-admin user is logged in. So instead of using AllWebs, I used: var webs = siteColl.OpenWeb().GetSubwebsForCurrentUser() More info about GetSubwebsForCurrentUser() here


2

I had the same issue and got it to work in 2 ways. You have to make the app pool account running the WCF service either an Administrator on the SharePoint Server or make it a Farm Administrator. You also have to give this account rights on the Content Database as well as the SharePoint Config Database. For some reason I am finding out that I also have to ...


2

A jr. administrator had used stsadm -o setsiteuseraccountdirectorypath -url https://portal.domain.com -path <LDAP Path> to change the value of the SiteUserAccountDirectoryPath property. He did this in an effort to restrict the people picker from displaying people not currently in the site collection from being displayed. When he made his changes it ...


2

I dont think you will need Event Receiver for your purpose, please find this thread of stackexchange SP 2010 Custom Access Denied Pages For help with command you may find this MSDN Article helpful For details steps please go through this Customize the Access Denied Page


2

The most common issues: Your master page hasn't been approved (in feature receiver) so it's left in Draft mode Your master page includes some code which access something the uses don't have access to Your master page includes references to files (images/stylesheets/...) that the user don't have access to


2

Try the following code. It is always better to use the token of the system account instead of running all your code inside of SPSecurity.RunWithElevatedPriviledges(). The code is much stable and secure this way. UPDATE: Since you are using your code in an Application Page, make sure you have called the SPUtility.ValidateFormDigest() method before any of ...


2

You actually need to generate a SP.ClientContext for the app web and a SP.AppContextSite for the host web. To get a reference to a list in the host web, try the following: // Get the ClientContext for the app web clientContext = new SP.ClientContext.get_current(); // Use the host web URL to get a parent context - this allows us to get data from the parent ...



Only top voted, non community-wiki answers of a minimum length are eligible