Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SharePoint > SharePoint Development
| Search | Today's Posts | Mark Forums Read
SharePoint Development Programming and development for SharePoint Portal Server and Windows SharePoint Services
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SharePoint Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 11th, 2008, 11:43 AM
Registered User
 
Join Date: Jan 2008
Location: NYC, NY, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to SAgosto
Default WSS 3.0 changing various document's content!?

Hello:

I am implementing a simple document authentication for my application. To do so, I am comparing the document's contents that was saved from a previous date to the current document. If they match (a long with other keys), I consider it authenticated.

This works fine but during my testing, I found that *.DOC*, *.MSG have issues. Other file types such as *.TIF, *.BMP, *.TXT, *.PDF, etc.. work just fine. I haven't check that many file types but this is an issue.

Apparently, after I save this content on the SPListItem, the content changes. I verified this by checking the SPListItem object's File object's OpenBinary method. After I upload the same document, the byte array is identical. As soon as I update the SPListItem to save this data within one of the fields, the byte array from the OpenBinaryM method is different. This means that Sharepoint is altering the document? I am really hoping that isn't the case.

Anyone have any ideas?

  #2 (permalink)  
Old January 14th, 2008, 12:36 AM
Registered User
 
Join Date: Jan 2008
Location: NYC, NY, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to SAgosto
Default

TTT

  #3 (permalink)  
Old January 14th, 2008, 01:57 PM
Registered User
 
Join Date: Jan 2008
Location: NYC, NY, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to SAgosto
Default

Verified that for at least .DOC* and .MSG, SP is altering the content based on the SPListItem. So if you modify the metadata, you modify the content that is returned within OpenBinary method.

I am very surprised someone has not responded to this thread. In now way should SP be altering data.

  #4 (permalink)  
Old January 15th, 2008, 01:43 PM
Registered User
 
Join Date: Jan 2008
Location: NYC, NY, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to SAgosto
Default

Apparently, SP's Document Demotion is causing this. Trying to find a way to disable but it appears built-in. Not good.

  #5 (permalink)  
Old January 15th, 2008, 04:27 PM
Registered User
 
Join Date: Jan 2008
Location: NYC, NY, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to SAgosto
Default

Solution:

Set SPWeb object's ParserEnabled property to false.

Thanks everyone for all the help!



Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 3.5 and WSS 3.0 Bill-W-r-o-x BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 June 10th, 2008 01:31 PM
Upgrading WSS 2.0 to MOSS ncastro SharePoint Admin 1 June 5th, 2008 08:13 PM
Customize Login.aspx in WSS 3.0 saurabh_singh0 SharePoint Development 0 February 25th, 2008 10:30 AM
changing content depending on combo box value bewise PHP How-To 1 September 13th, 2006 11:57 AM
Dynamically Changing the content of a table cell asdasd Javascript 4 February 18th, 2005 01:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.