There has been blocked for additions to the site - sharepoint

I am trying to execute a console application which updates creation dates on specified items in sharepoint lists.
When I try to execute I get this error:
There has been blocked for additions to the site. Contact system administrator to solve the problem.
I then went to the Central Administration to check if Quotas and Locks was set to Not Locked. Then afterwards running the stsadm commando
stsadm -o getsitelock -url http://mysite
Which returned SiteLock Lock="none", so those 2 matched.
I have debugged the console application and made it console.writeline each step it takes and it gets to the item.update(); part and that's when I get the above message.
Do you guys know another way around to solve this issue?

Have you gone through all solutions provided here ?
or
check the document library settings and found out that doc. library was set NOT to require check out although versioning was enabled. just try to set to require check out

i dont know this is the right solution but i have faced the same problem and i did restart my machine and the problem is resolved.
hope this trick work for you.

Check if your database read-only.

Related

How to recover from "No authentication methods configured" on login page

While trying to get GitLab Kanban Board to run nicely with my GitLab server I somehow managed to get myself locked out of the latter. Whenever I open the GitLab-URL now there's the message "No authentication methods configured" and no option for logging in.
Unfortunately, I don't even remember the exact settings that I was messing around with at that time, because it was a while ago and it's only now that I found the time for dealing with this problem again. IIRC one of the last things I did was to try and get OAuth working. (And I think that I was changing some settings in the web interface last, not in the settings files.)
Unable to find a solution online, one of the things I tried was to do a backup and then restore that on a different server. But the result is that I then get the same message on the new server also.
Does anyone have any idea on how to recover from this situation? Is there any way for example to enable "normal" login again by changing settings in the database?
If it's not (easily) possible to recover the whole GitLab installation, is there some way to somehow at least extract the bug report data from it? That's the data that I would be most unhappy to loose...
I'd really appreciate any help, because I'm completely at a loss right now!
You can use the Rails console to reenable your sign-in.
sudo gitlab-rails console
s = ApplicationSetting.find_by(signin_enabled: false)
s.signin_enabled = true
s.save
This will modify the rails settings directly.
As of version 10.5.X, use this instead (different ApplicationSetting key)
sudo gitlab-rails console
s = ApplicationSetting.find_by(password_authentication_enabled_for_web: false)
s.password_authentication_enabled_for_web = true
s.save

How to add a solution in SharePoint when the UAC is Enabled?

I use stsadm-o addsolution -filename "mySolution" to install a solution, but when the UAC(User Account Control) is enabled, a "Access Denied" exception will be thrown.
I want to know how to add a solution with UAC enabled?
Note: I cannot use runas administrator, for it's cannot be invoked by third assemblies.
Update: I just want to use C# to implement Runas Administrator.
thanks in advance.
I'm going to take a stab in the dark here - I'm guessing that when you say 'third assemblies', you're referring to a third party assembly that is running as part of some application, and you want that application / assembly to be able to install a sharepoint solution. I.e., you're building some type of sharepoint solution management tool.
I could be way off on that, as it's just a guess. But assuming that's true:
If you have UAC enabled, and you want this other assembly / application to be able to call stsadm, then you need to do run this other assembly / application as administrator. Right-click on the exe that kicks it off (or shift-right click), then click 'run as administrator'. That will cause the other application to run in the context of an administrator, so when it calls stsadm it should work.
Run command prompt as Adminstrator
after two days investigating, I have the final result.
In SharePoint 2010, I installed a solution named "NewsGator.Core.wsp", it's a third party solution. When it's installed, some assemblies will be deployed to GAC. When you retract the solution you must notice that if the assemblies are used by w3wp.exe or not(process monitor can do this, you should first run it as administrator), if so your retract job will failed. It occurs in UAC enabled environment and will succeed if you use runas administrator to execute retract method.
So, firstly I doubted it as permission issue, using runas administrator can just make it work, then I came to ask the question above, but finally I found the cause by process monitor, after ended w3wp.exe or iisreset I got my retract job complete with successful.
Hope the above can help you.
Thanks very much for all your help, best regards.

SharePoint feature not getting activated by default

I have created a feature and i am auto activating it whenever 'My Site' gets created.
I am activating it for the template SPSMSITEHOST.
This feature changes the Picture URL property of User Profile.
Now, the problem is my feature gets activated but it seems it does not execute the code by default and and does not change the picture URL property.
When i deactivate the feature and activate the feature again then feature works absolutely fine as expected.
P.S: I am facing this issue on Production server, surprisingly this work fine on Staging server , i mean the same code !!
Any help ??
Thanks.
Sounds like something becomes out of sync on your production environment. Could it be caused by load balancing?
Are you doing this through STSADM commands?
I would stick the following line after after each command:
stsadm -o execadmsvcjobs
This will make sure processing for previous commands is done before moving on.
If thats way off then I would think its something to do with:
a) The way you're activating the feature... if you're using feature stapling, are you sure that the latest version of your stapling mechanism is in place?!
b) Assuming you have some sort of feature receiver in your code behind. Are you sure there isn't an error occurring thats being hidden by a try catch? If there is then you need to see what the exception is...
If it works when you deactivate/activate the feature, that almost eliminates security issues.
Hope this helps..
After long investigating and search for this problem i tried to rearrange the features at package file depending on the features dependencies, it seems SharePoint activate these features one by one as it's arranged in the package file and this is worked for me :)

MOSS 404 errors for some users on certain sites, sometimes

Everything works fine for most accounts 100% of the time but here and there some users who are able to access a subsite fine one day are greeted with a standard 404 the next. This can last for an hour or two days, it's really inconsistent.
I check the iis logs and it says the status is also a 404 for these requests, nothing else looks unusual. Sharepoint logs have nothing for the timestamps either.
Correct me if I am wrong but if it was a permission issue an access denied message would be shown.
It is not the individual computer because when a user is having this problem and I can log in with their account and I also get the 404 error although I am on the exact site with another account in another browser at exactly the same time, and it works perfect.
Any suggestions would be greatly appreciated, I've done a fair amount of searching but can not find a similar situation or help anywhere.
Since the information is very strict at the moment, I will throw a few questions that might lead you towards the problem.
Are we on a loading balance setup? The intermittent 404 might be cause by one of the servers Web FrontEnds not correctly serving requests.
Are we running out of disk space in the SQL Server machine? This might cause it
Are the blogcache or site caches enabled? Some routines may break them
Do we have Anti-Virus on the server? (it HAS to be asked :p)
We get very high packet loss between the servers? (The error would be different though)
Something that might occur very often is when you have, say, custom code a DLL on the GAC or the bin folder, and since you could be on loading balance the second server does not have this DLL in its own GAC or BIN folder. Sharepoint usually raises 404s when assemblies are not found too, not only requests.
This seems like a longshot, but... could those SharePoint sites be throwing a 404 HttpException? It seems like you'd see that in the SharePoint logs, too, so it's even more unlikely.
At any rate, is your SharePoint logging level set to an appropriately verbose level to debug weird stuff like this?
Are people checking in & publishing master page changes when new CSS files and/or other includes (script files, etc.) are not yet published at all? I've seen this cause a 404 a few times when users forget to check before they publish.
I have had to write custom code within a SharePoint context and I had those 404 errors as well. The solution, in my case, was to ensure that the block of code executing had these 2 conditions met:
1) Run with elevated privileges, regardless of the fact that it is a 404 this was part of the solution.
2) web.AllowUnsafeUpdates = true; This line of code needed to be added even though it was wrapped within an elevated privileges block.
Once these were added the issue did not occur. This was happening on both load and non-load balanced environments.
This reminds me of a strange asp.net bug that I had a few months back.
It was caused by a patch that had been applied (to the framework if I remember correctly)
try downloading this Windows update list tool and have a look at what has changed since the problem started.
I concede that if there was a problem with a patch then its more likely that it would be a consistent error, but it's worth a look.
It was a permission issue, I had figured this out awhile back but basically a few accounts were not setup properly and could not load a fresh copy of the page, when someone else would hit it they would be able to view the cached page fine. Error was never thrown as a permission issue or access denied anywhere but this is what fixed the problem.

Windows XP Pro Service runs using User logon, not using Local System

I wrote a Windows Service using VS 2005 and C# on WinXP Pro SP3. It starts another program which runs to completion and then exits.
The service is installed using installutil and serviceInstaller. It is built release and put into the C:\Program Files\MyService directory. The serviceProcessInstaller Account is set to LocalSystem in it's Properties.
If I set the Log On to Local system I get an 'Access Denied' error (using a try-catch block), but if I set the Log On to my account with the correct password, it runs perfectly.
What am I doing wrong? Any suggestions will be very welcome.
It will be useful to know where the access denied error comes from. Since you say it is from a try/catch block, I assume it is your code that handles it. That would mean that your service is starting just fine, but has problems doing its job.
It could be environment related problem, since the environment for LocalSystem is different than your user account. Also, it could be that the program it starts is not executing properly and it is returning the error.
Without more info, it is just speculation. What is that other program doing? Where is the error occurring? Why don't you debug it and find which part returns the access denied error?
Agreed, it should be on SO. That aside, check your file/folder permission sand ensure System does in fact have the necessary rights. Do the same for the registry keys. The System event log should give you some clues.
Both answers: thanks for the help.
The error orrurs at the Process.Start() call.
The file and directory security shows Everyone has full access to the directories and the executable.
FOUND IT! I had added a user name and password to the ProcessStartInfo object, thinking that it would be useful when the target program tries to get to the database. Oops! When I took that stuff out, the target runs jult like it should.
Thanks again to all who replied. Mea Culpa!

Resources