SOS 4.1 (upgraded to 4.1.2) with VSS 6.0d databases
Everything was working fine up until very recently. But now, adding or publishing a PDF to a VSS database via SOS 4.1.x does not work. Opening a recently published PDF gives the "unrecognized token" error.
I see via Google that this error means that the PDF has been corrupted during transit to the VSS database.
Now, I can add a PDF to the same database with just the VSS 6.0d agent, so it is just SOS.
Has anyone had seen this problem?
PDF corruption: unrecognized token
Moderator: SourceGear
PDF corruption: unrecognized token
Randy Wong
Solved It! But ...
... I would like to know why ... I have not read this anywhere and Google did not come up with this, so I am guessing this is either obvious to everyone or it is something new ...
What I forgot to mention was that last week I had installed VSS 2005 on the same server with VSS 6.0d. I did for some testing so it is not being used in production.
When the error of a blank PDF and an "unrecognized token" came up, I Googled and came up with corrupted PDFs upon transit, but nothing with VSS.
This is what I did to fix it. First of all, the PDF that was added to the VSS 6.0d database via SOS 4.1.2 was corrupted and unrecoverable (blank pages.) so I deleted it.
I then went back to the VSS server and registered SSAPI.DLL for VSS 2005, just in case.
I restarted the SOS 4 server service and tried adding a good PDF, and then tried opening it from SOS and reading it with Adobe Acrobat. Same problem -- blank pages.
I deleted that file off the database. I uninstall VSS 2005 off the server. I stopped the SOS 4 Server service and then deleted the VSS 2005 program files folder off the system.
I then went to the VSS 6.0d folder and registered ssapi.dll in the win32 folder.
Restarted the SOS 4 Server service, and I did the same adding of the same PDF into the database within SOS, and then opened it within SOS. PDF is now showing text and pictures.
I am able to replicate this on a test VSS (Windows 2003 server) box, so I know it is not a fluke.
To reiterate: my original server setup was VSS 6.0d, SOS 4.1, and then installed VSS 2005. After the PDF corruption, I updated to SOS 4.1.2, which did not fix anything, so I proceeded with the steps above. Hopefully this is helpful to someone.
What I forgot to mention was that last week I had installed VSS 2005 on the same server with VSS 6.0d. I did for some testing so it is not being used in production.
When the error of a blank PDF and an "unrecognized token" came up, I Googled and came up with corrupted PDFs upon transit, but nothing with VSS.
This is what I did to fix it. First of all, the PDF that was added to the VSS 6.0d database via SOS 4.1.2 was corrupted and unrecoverable (blank pages.) so I deleted it.
I then went back to the VSS server and registered SSAPI.DLL for VSS 2005, just in case.
I restarted the SOS 4 server service and tried adding a good PDF, and then tried opening it from SOS and reading it with Adobe Acrobat. Same problem -- blank pages.
I deleted that file off the database. I uninstall VSS 2005 off the server. I stopped the SOS 4 Server service and then deleted the VSS 2005 program files folder off the system.
I then went to the VSS 6.0d folder and registered ssapi.dll in the win32 folder.
Restarted the SOS 4 Server service, and I did the same adding of the same PDF into the database within SOS, and then opened it within SOS. PDF is now showing text and pictures.
I am able to replicate this on a test VSS (Windows 2003 server) box, so I know it is not a fluke.
To reiterate: my original server setup was VSS 6.0d, SOS 4.1, and then installed VSS 2005. After the PDF corruption, I updated to SOS 4.1.2, which did not fix anything, so I proceeded with the steps above. Hopefully this is helpful to someone.
Randy Wong
This is not an SOS issue. It is, however a known issue with VSS 2005:
http://www.dustyd.net/archive/2006/07/0 ... files.aspx
http://www.eggheadcafe.com/aspnet_answe ... 304130.asp
The solution is to connect to the VSS database with the VSS Admin client (ssadmin.exe), then look under Tools->>Options->File Types. Add *.pdf to the list of binary files.
Next, delete any PDF files that were added previously, as these have already been corrupted by VSS. Then, re-add the files. Now you should be able to retrieve them with no problems.
You can also designate PDFs as binary in the VSS 2005 Explorer client on the SOS Server machine in C:\Program Files\Microsoft Visual SourceSafe, under Tools->Options->File Types. The SOS Server uses the VSS automation component provided by the VSS Client, so settings in the client will generally be honored by SOS.
As you have found, VSS 6.0d works properly with PDF files. But as mentioned earlier, once the files have been corrupted, changing the version of the ssapi.dll or changing SOS makes no difference. The PDFs need to be deleted from the database (and destroyed) and then re-added.
http://www.dustyd.net/archive/2006/07/0 ... files.aspx
http://www.eggheadcafe.com/aspnet_answe ... 304130.asp
The solution is to connect to the VSS database with the VSS Admin client (ssadmin.exe), then look under Tools->>Options->File Types. Add *.pdf to the list of binary files.
Next, delete any PDF files that were added previously, as these have already been corrupted by VSS. Then, re-add the files. Now you should be able to retrieve them with no problems.
You can also designate PDFs as binary in the VSS 2005 Explorer client on the SOS Server machine in C:\Program Files\Microsoft Visual SourceSafe, under Tools->Options->File Types. The SOS Server uses the VSS automation component provided by the VSS Client, so settings in the client will generally be honored by SOS.
As you have found, VSS 6.0d works properly with PDF files. But as mentioned earlier, once the files have been corrupted, changing the version of the ssapi.dll or changing SOS makes no difference. The PDFs need to be deleted from the database (and destroyed) and then re-added.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager