Hot answers tagged access-denied
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
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 ...
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
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 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?
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
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
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 ...
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
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()
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
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
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
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
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 ...
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
Don't use SSL (https) whenever specifying your content sources in SharePoint search.
Also, the second error just means that users and services are using the http://servername url to access to the site. It's more of a warning than an error. I constantly see that on my farm, but I ignore it.
1
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
1
If your site uses custom branding or scripts, those items are usually placed in the /Style Library/ of the root site. In your example, the user might be attempting to open /sites/USA/Marketing but that is in turn attempting to reference resources in /Style Library/ which the user might not have permissions to, thus access denied.
1
There are 5 solutions:
Grant your application pool accounts appropriate rights to the configuration database.
Create a custom windows service that runs as the farm account and uses .NET remoting to communicate tasks.
Create a virtual application under the _layouts folder of each web application and have it run using the SCA application pool.
Direct all ...
1
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 ...
1
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
