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 ...


8

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.


8

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 ...


5

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.


4

Be sure that the Windows firewall isn't blocking it on the server. If it is Server 2008, it will block it by default. If that is not it, you may want to be sure you are not using local computer accounts for your SharePoint service accounts.


4

That page: AccessDenied.aspx uses a master page called simple.master and not a default.master located on master page gallery on each site. So you should start from there.


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 => ...


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

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

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

Double check that the pages have been approved. Also make sure that your page layout is checked in and approved.


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

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

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

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 ...


3

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 ...


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

I suspect that your account doesn't have access to the SharePoint content databases. Have a look at this support article which refers to stsadm but should also apply to Powershell. When you use the UI / web services to interact with SharePoint, the connection to the content database is made under the security context of the app pool account. From ...


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



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