Hot answers tagged

13

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


10

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.


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.


7

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

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


5

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?


5

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.


5

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


5

Open Site Settings -> Then Click on Site Permissions -> From Ribbon (Permission Tab) Click on Access Request Settings. This will open up a dialog window where you can specify the email address.


4

There is a hidden list in your site collection at /_catalogs/users. See this explanation. If the user has yet never been assigned to a group, there is no entry for her / him in the list, that means there is no SharePoint user for the account. If the user is assigned first time to any group, the SharePoint user should be created first. If the user, who ...


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

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

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

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

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

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


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

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

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

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

You should open up port 100 on the firewall by using Windows Firewall with Advanced Security. Inbound Rules > Port > Protocol:TCP, Specific Port: 100 > Allow the connection > Apply to all zones > Enter a rule name > Finish.


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



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