SPFile.OpenBinary() unexpectedly deletes metadata from document
Hi,
In our Sharepoint 2010 application we have some custom code that copies documents between site collections. Recently, one line of code has started to cause serious trouble:
SPList mylist = web.Lists["My
documents"];
SPListItem
item = mylist.GetItemById(someintegerID);
byte[]
bytes = item.File.OpenBinary(); //Here be serious trouble
the third row of code above, OpenBinary(), will randomly delete metadata from the listitem "item"! Even though the item is only supposedly read. We are never in any way doing any update to that listitem, we only use the bytes
to create another item in a completely different site collection further down in the code.
This behaviour is not repeted in all our environments, currently only on our build server and test environment. We are trying to find out how they differ, we suspect that OWA and different patches might be involved.
Can anyone please help with this? What could it be?
Some notes:
This behaviour can be observed by just running the above three lines of code in a console application on the affected servers
The metadata will not be deleted for a pdf document in the same list, it seems to affect office documents like Word and Excel files.
It happens specifically on the method call to OpenBinary(), not later, not before
A custom content type is the only content type allowed for the affected list, this content type has som fields of its own, it also inherits some fields from a parent content type which is also a custom content type. The list item/document has this
content type set and that does not change.
--FG--
Hi,
Thanks for your sharing, it will be helpful for others who stuck with the similar issue.
Best regards
Patrick Liang
TechNet Community Support
Similar Messages
-
HI
I created a web application and configured rbs storage ,
I uploaded documents (for ex: 18 number)
after uploaded documents , and observed the RBS storage folder, number of files are increasing (39 number) , its working fine
and also I run the querys to check the rows increasing or not , (when I upload new doc rows are increased its fine also)
select count(*) from alldocs
Select count(*) from AllDocstreams
but when I delete some docs from document library ,
1)the doc itself deleted from document library
2)when I check the rbs storage there is no number of files are decreased(its still 39 files ), its same as before doc deleted from doc library
after some time I found the number of files are decreasing from RBS storage folder in sql server,
here I want to know the how the files are decreasing from RBS storage after some time, where shld I check the settings for this? and how I control on it
here how I know the settings for cleaning up orphan BLBOS how these deleted BLOB
adil1. WHen you delete the file from Sharepoint, it is still present in Recycle bin. This is a default setting in sharepoint for 30 days. Once files are deleted fro Recycle bin, it can also be delete from RBS
2. There is a RBS cleanup job which deletes files from RBS. for more info check
http://mehuljamod.blogspot.in/2012/09/remote-blob-storage-maintainer-rbs.html -
Editing Excel in Browser deletes title from document library.
We just noticed an issue where if we update an Excel file using Office Web Apps, when we return to the library the excel title is missing from the document library. The name and other metadata in the library all seem to be preserved, it's only the Title
field that seems to be deleted. We confirmed this behavior on several different site collections and on our test environment which has SP1 installed as well.
Anyone know of a fix for this?
Thanks.
Nick HurstHi Nick,
According to your description, my understanding is that the Title became blank after you edited the excel file with Office Web app.
Whether this issue occurred when you edited the files of other types, like word or ppt.
Please install SharePoint 2013 SP1, compare the result.
SharePoint 2013 SP1
http://support.microsoft.com/kb/2817429/en-us
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
Apple Configurator not deleting metadata from music and books?
We set up an iPad cart for our pilot program using 30 iPads. We did a basic configuration on them all, then established a backup to restore from. We took a couple of the iPads and added photos, books from iBooks, books from iTunesU, and some music. After restoring the iPads from the backup 1 of them looks fine but the other still shows the music (althought it doesn't play), books (which you can read) and a course in iTunesU (which you can browse). We're using a single institutional ID on all the iPads and we're not sure why we can't get this iPad to delete these items.. The backups were done on an iPad that hadn't been used for anything after the initial configuration.
any ideas?The Music that will be on the iCloud are only the ones you bought on iTunes and the ones you uploaded using Match service.
Otherwise, you need to make sure that iCloud is Turn ON on both devices - settings/iCloud -
Access Denied only when deleting items from document libraries
This is across the farm every user is effected. Everything has been working fine for years without issue. First thing I noticed the other day was when opening a document (any document) and clicking "Edit Document" I'm prompted
with "there is a new version on the server, do you want to use it" Click yes and go about my business. I can replicate this with brand new documents that have no changes. Not sure if that is related but thought it should be included.
Now on to the real problem.
No permissions have changed.
Users can created new items in document libraries, edit them without issue. Try to delete them "Access Denied" Go into DataSheet view and/or Explorer view and can delete all day long.
Any ideas?
It is very strange at least admin should allow to delete if there is no additional customization on library. Can you also check if there is checkin/checkout enable in library and file in checkedout mode.
Do one more testing, upload new document in same library and check whether user is able to delete new file or not.
>All lists across the farm. No policies.
As you said this is happening across all the lists in site collection so have you tested the same in different site collection? if not then please do so.
Also check if by mistaken there is any modification in web application permission.
http://technet.microsoft.com/en-us/library/ff608071%28v=office.15%29.aspx
Let us know your result
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
After delete file from documents the direct link still alive.
Hello.
I upload a image to the style libary folder, then i publish the file and delete him BUT the direct link to the image still work.
I try to upload anther image with the some name but when i try to browse the direct link i get to deleted file.
If i upload a image and delete it before i publish the file I don't have this problem.
I try to flush the blob cache with this commends:
$webApp = Get-SPWebApplication "<WebApplicationURL>"
[Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
Write-Host "Flushed the BLOB cache for:" $webAppbut this doesn't work.I clear the cache on the local pc and doesn't work to..Any idea someone?Thanks!Hi,
To check if there is cache issue, please access the url in another PC to see if the issue persists. You could also open style library in SharePoint designer to double confirm it.
In addition, if you click the ellipsis of the image item, there will be a preview panel to show the picture, is it the newly upload one?
Regards,
Rebecca Tu
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
I dl a file it goes to my doenload folder,then i copy it to another folder for example document,then when i delete it from download it will erase at all? why?
is it ok to have the file in both downloads and document? it will not be more size?If you copy it to another folder, e.g., Documents, and you can see it in the Downloads folder then you now have two copies of the file. If you delete one copy, the other stays intact. If you keep both, there is no harm, although the amount of disk space used is twice as big as when you only keep one copy.
-
I'm trying to delete files from an external disc and it doesn't let me couse this pops up:
The operation can’t be completed because an unexpected error occurred (error code -1407)
Please what does it mean? I also have a file in the trash of my mac book named something similar to: a'*.'*.'*'.*.
and this cannot be deleted either..
Please let me know what I can do.
I also have many files in the external disc that I need so I cannot do a format..
Thank you.
Best Regards
KarinHave you tried putting the file from your Drobo, onto your computer, then onto to the external hard drive?
-
Pages crashes when opening any document on iPad 3 Latest version. I tried everything I could find on the net and finally deleted Pages from my device and reinstalled it. Still when I try to create a new document or open a document it just crashes out.
Try this:
Make sure IOS is updated to latest version
Reboot device by pressing both the home button and sleep/wake (power) buttons at the same time for 10-15 seconds until the apple logo appears on the screen, then let go.
If that doesn't work then reset the device by going to settings/general/reset/reset all settings -
How do I bulk upload documents using PowerShell and extract metadata from file name?
I have a requirement to upload a bunch of documents into a document library. Based on the content type, the rules of updating the metadata is different...the one giving me trouble is to extract the metadata from the file name. If I have a file name like
"part1_part2_part3.pdf" how do I extract part1, part2, part3 and tag each document being uploaded into SharePoint, using PowerShell? I have searched and have not been able to find anything to get me started.
Has anyone done this before? Or is there a blog I can take a look at? Thanks
You will have to write a PS script encompassing this logic.
Read files from the folder using
Get-Item cmdlet
Determine the content type based on the path or filename.
Split the file name to extract the tag names.
If the metadata fields in the content type is a managed metadata field, check whether the term exists and set it.
Updating SharePoint Managed Metadata Columns
with PowerShell
This post is my own opinion and does not necessarily reflect the opinion or view of Slalom. -
I deleted a pages document from iCloud. how do I get it back?
How do I recover a pages document that was deleted from icloud? I don't see a 'trash' folder. I was over eager in deleting my icloud documents to comply with storage.
There is no trash folder on icloud. On the mac, copies of icloud files are stored in the following folder(s)
~/Library/Mobile Documents
Note that Library in the user's home folder is now hidden, so you'll have to set Finder to view hidden files.
The Mobile Documents folder has subfolders where copies of the doc/data files are stored.
Now use Time Machine to find versions of the missing file(s). -
How do i add or delete information from an existing pdf document?
How do I add or delete information from an existing pdf document??
The free Reader has no editing capabilities.
-
Deleting attachments from SAP documents (FB02)
I am in need to control the action of 'deleting/removing' attachments from documents, when entered via FB02.
I believe the authorization object for attached documents is S_BDS_DS.
Does anyone how to 'enable' or 'disable' this activity ?
--- When run FB02 or FB03, at the upper corner you click on the 'Services for Object' button,
--- Then, you select the 'Attachment List' option
--- Next, you have a new window with a list of attachments, if any
Within that window there is the 'delete (recycle bin) button.
How can I activate/deactivate it ?
Best regards,
TomHari, thank you for your reply!
My question is "How to enable/disable the action of deleting the attachment" ?
Once the window that lists the attachment(s) opens up (via FB02) , how do I show / don't show the recycle bin button ?
Best regards,
Tom -
In microsoft office word, how do I delete items from the recent documents tableau? I have options for new, open, save, saveas, etc. but no option to delete. Thank you.
Hello.
I have no idea and you should contact Microsoft for support. This is Firefox's support forum.
Thank you for your understanding. -
Accessing MetaData from Bex - Document Links?
Hello experts,
This is a two part question.
We are interested in BW's ability to provide metadata access to report users. We are familiar with the Metadata Repository in the Admin Workbench but this will not be accessible to the majority or report users.
Issue 1: Is there a way to access BW metadata from the Bex report? If not what possible workarounds can you suggest?
One workaround that was suggested was to create a document link within the Bex report to access our own technical specifications.
Issue 2: Is it possible to create a document link for a Bex report? If so how? Is there more flexibility to access metadata via Web Reporting?
Thanks for any suggestions,
AdamElaborating on point 2 -
You can attach a document to the BEx query. This can be done in properties section of the query. You can also attach documents per characteristic in AWB. Whichever of the above suits your requirements.
I am not sure what exactly you mean by "...more flexibility to access metadata via Web Reporting?". It is possible for documents to be available over an HTTP content server.
Anil.
Maybe you are looking for
-
Exchange 2007 - Send As Permission
Hello, I have Exchange Server 2007 installed on my Windows Server 2008 system and am using an ASP.NET web application to send an e-mail message when certain events occur. My problem is that I have everything set up and functioning properly, the e-ma
-
Multiple instances of ichat running at once
Very short version of events: doing long distance tech help for elderly friend (which is agonizing beyond belief 'cause I can't screen share). On her machine --- iChat starts up fine, in fact it will start up more than once, she can have multiple ins
-
Safari startup page not loading at launch
Since Mac OS Lion upgrade, Safari now reopens pages displayed when closed even if the option is not selected. For instance, I tried to select "Home Page" and "Top Sites" option and it still reopens the same pages as when I closed it previously. Am I
-
I had the latest flash player when i got the MBP. it was working perfectly till yesterday... now its not woring at all. Flash webites will ask a "?" inthe middle of a Quicktime icon. Tried uninstalling the flashplayer using the uninstaller available
-
Why is it cheaper to leave verizon including ETF?
I am seriously thinking of leaving for T-mobile. I have a family plane with 3 iPhones and 6gb of shared data and pay $206 a month. That includes my discount from work. I can pay my ETF for three iPhones Unlimited everything "bring your own device" a