Failed to get value of the “Approval Status”

The full error message reads “Failed to get value of the “Approval Status” column from the “Moderation Status” field type control”. This error has started occuring on document libraries containg web part pages that were upgraded from SPS 2003. The Hidden property on the Approval Status field has somehow been set to false. The Hidden property should be True.

I found this fix. Download a utility called SharePoint Manager 2007 from this site.
Run the application on a SharePoint server.
Go to View – Object Model and make sure “Full” is selected.
Browse to the library in the treeview.
Open the list of Fields and select the Approval Status field.
Change the Hidden property to True.
If the property is already set to True then change it to false and save it. Then change it back to True and save again.


Mass Deleting Document Version History

Version history takes a huge amount of disk space
The following SQL will delete the version history for a specific doc or set of docs
BE VERY CAREFUL! Remove the first line and run a SELECT statement first so you don’t delete the wrong versions!

Set the DirName = to the path to the doc library
Set the leafname = to the name of the file

delete from alldocversions
from alldocversions v inner join alldocstreams s on =
inner join alldocs d on =
where DirName = ‘FolderPath’ and leafname like ‘a%’

Here’s a cursor procedure to delete selected files

declare @dirname varchar(100)
declare @leafname varchar(255)

DECLARE complex_cursor CURSOR FOR
    select distinct DirName, LeafName
 from alldocversions v inner join alldocstreams s on =
 inner join alldocs d on =
 where DirName like ‘Folderpath%’ and leafname like ‘c%’;
OPEN complex_cursor;
FETCH NEXT FROM complex_cursor INTO @dirname, @leafname
 PRINT ‘Deleting ‘ + @dirname + ‘, ‘ + @leafname

 DELETE FROM alldocversions
 FROM alldocversions v inner join alldocstreams s on =
 inner join alldocs d on =
 where DirName = @dirname and leafname = @leafname

 FETCH NEXT FROM complex_cursor INTO @dirname, @leafname
CLOSE complex_cursor;
DEALLOCATE complex_cursor;


403 Forbidden and Forms Authentication with MOSS

We have a public MOSS site setup to use Forms Authentication for protected content. When the user hits files in certain document libraries, the user is automatically redirected to the login page and then returned to the document after a successful login. However, for some users, when they click a link to view a protected file they are not redirected to the login page and a “403 Forbidden” error message is displayed in Internet Explorer. This behavior does not occur in non-IE browsers (Firefox, Safari).

After some research I found this article. It looks like the culprit is a Microsoft add-in for Office Live.

Fix: Uninstall the application called “Microsoft Office Live Add-in 1.3”. That solved the problem right away. No system reboot or browser restart necessary…

MOSS Search Indexer “Access is Denied”

Have a MOSS farm the a web front-end and a separate search indexer. After installing some patches the indexer started failing with an Access is Denied message. MOSS configures a dedicated index machine by adding an entry to the HOSTS file that points the MOSS sites to the indexer’s IP address. If you try to connect to your MOSS site on the Indexer’s desktop you will unable to connect.

The patches are KB960803 and KB963027. You can read the notes here.

Following the instructions for Method 1 in the article fixed the problem and indexer was able to access and index the content again. The fix is a small registry entry that allows local connections to other host names.

Using IE8 With MOSS

If you’re using IE8 you’ll notice that some of the content in MOSS pages doesn’t work as designed. The issues will only occur if IE8 is rendering the content in native mode, which is only used in Internet zones. This is apparently related to some of the controls used to render the navigation. This is easily solved by rendering your site with an HTTP response header that tells IE8 to render the site in IE7 compatibility mode.

I added the HTTP response header to my MOSS internet site as described in this article and it now renders in IE7 compatibility mode.

Reporting Services 2005 in a MOSS Site

I wanted to run Reporting Services 2005 reports on my secure MOSS site so the user wouldn’t have to login twice. I did this by adding the Reports and ReportServer virtual directories to my MOSS site in IIS. The MOSS web server had an instance of Reporting Services running on it.

The Reports virtual directory is something like this
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportManager

The ReportServer virtual directory is something like this
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer

Both virtual directories need to have an “application” created in IIS and should use the same application pool that the MOSS web site uses.

Reporting Services IIS Settings

Now go to the Reports directory and modify the web.config file
The <sessionState> entry should be changed to this
<sessionState mode=”InProc” cookieless=”false” timeout=”20″ partitionResolverType=””/>

Also add the following to the <appSettings> section
<remove key=”ReportViewerMessages” />

Now go to the Reports directory and modify the RSWebApplication.config file
Look for the  <ReportServerUrl></ReportServerUrl> tags and add the URL to the virtual directory
If your MOSS site is then you would enter

Find this tag  <ReportServerVirtualDirectory>ReportServer</ReportServerVirtualDirectory>
and change it to  <ReportServerVirtualDirectory></ReportServerVirtualDirectory>
(Remove the “ReportServer” in the tag)

If you’re using the ReportServer virtual directory to render reports, you will probably also want to modify the web.config by adding this just after the </httpHandlers>
      <remove name=”PublishingHttpModule” />

This will get rid of the annoying Event Log message. See my post here for more info.