Archive

Archive for the ‘Microsoft Office SharePoint Server 2007’ Category

“User modifications to the SharePoint content database” error message when you upgrade a SharePoint Server 2007 content database to SharePoint Server 2010

March 1, 2012 1 comment

The Pre-Upgrade Checker for Microsoft Office SharePoint Server 2007 is designed to verify that your existing installation of SharePoint 2007 is ready for the upgrade to SharePoint 2010.  It verifies that the OS is the correct version, that there are no orphan sites or sub-sites, it verifies the web config file, the SQL database version and a host of other items.

When going to run the Pre-Upgrade Checker included with SharePoint 2007, Service Pack 2, we got a nasty little surprise.  The Pre-Upgrade Checker told us that there was a problem with the database schema.  Uh-oh.

It returned a potential blocking issue that our SQL database schema had some serious user modifications.  It read, in part:

Potential Upgrade Blocking Issues
Issue : Content database with modified database schemas
User modifications to the SharePoint content database, including but not limited to table schemas, index, stored procedures, are not supported and will cause upgrade to future versions of SharePoint to fail.  The databases in the following list seem to have been modified from the original schema:
Data Source=SERVER\SHAREPOINT;Initial Catalog=Content_Database;Integrated Security=True;Enlist=False;Connect Timeout=15

That could be a problem.  We went to the logs and had a look:

[InvalidDatabaseSchema] [DEBUG] [6/14/2010 10:39:19 AM]: Checking schemas in content database Content_Database…
[DatabaseSchema] [ERROR] [6/14/2010 10:39:32 AM]: [Content_Database].[sysdiagrams] EXTRA Table
[DatabaseSchema] [ERROR] [6/14/2010 10:39:36 AM]: [Content_Database] NON EQUAL Property Tables
[SPObjectProcessor] [DEBUG] [6/14/2010 10:39:42 AM]: The rule failed.

It appeared as if there was an extra table inserted into the database, one that was not present in the original SharePoint database schema.  Somehow, there was a table calledsysdiagrams that was not created by SharePoint, and it was causing a mismatch with the Pre-Upgrade Checker.

Upon a little investigation within the SQL Server, the dbo.sysdiagrams table was located at Content_Database -> Tables -> System Tables.

How was the dbo.sysdiagrams table created?  A little bit of searching revealed the answer.  If someone clicks on the Database Diagrams within your database, it will immediate prompt you to create the necessary objects for for database diagramming.  Clicking “Yes” to this prompt will result in the creation of the dbo.sysdiagrams tables and some related stored procedures.  While these don’t pose any obvious risks to SharePoint as the diagrams relate only to the database, the Pre-Upgrade Checker will throw an error if they are present.

To correct the error, and allow the Pre-Upgrade Checker to run successfully, we performed the following:

  • We backed up the SharePoint_Content Database before making any changes.  This is critical in case something goes wrong.
  • I deleted the dbo.sysdiagrams table from Content_Database -> Tables -> System Tables
  • I deleted the following stored procedures from Content_Database –> Programmability -> Stored Procedures -> System Stored Procedures
  • sp_upgraddiagrams
  • sp_helpdiagrams
  • sp_helpdiagramdefinition
  • sp_creatediagram
  • sp_renamediagram
  • sp_alterdiagram
  • sp_dropdiagram

The screenshot  below illustrates these a little better.
stored_procs

After deleting the table and the stored procedures, we were able to run the SharePoint Pre-Upgrade Checker and our SharePoint site passed every check.

references:

http://support.microsoft.com/kb/982579

http://selfinflictedsharepoint.blogspot.com/2010/06/sharepoint-pre-upgrade-checker-fails.html

Advertisements

Error After Upgrading MOSS 2007 SP1 to SP2

February 29, 2012 Leave a comment

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Data at the root level is invalid. Line 1, position 1.

Source Error:

Line 1:  <browsers>
Line 2:      <browser id="Safari2" parentID="Safari1Plus">
Line 3:          <controlAdapters>

Source File: /App_Browsers/compat.browser Line: 1

 

Solution

I noticed that on the server the App_Browsers folder contained a new folder beside the compat.browser file named _vti_cnf.  This folder contained another compat.browser file containing some meta info.  I deleted this folder and this fixed the problem.

 

SyncUpgradeTimerJob sleeping for 10 seconds for SharePoint 2007 SP1 or SP2 Upgrade

February 29, 2012 Leave a comment

while upgrading to SP2 I was tripped by the fact that it took a really long time to complete the upgrade process. I checked with the upgrade.log file from C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS folder found the following line was written:

[SPManager] [DEBUG] [4/19/2008 10:51:53 AM]: SyncUpgradeTimerJob: sleeping for 10 seconds

 

Solution:

Set the following services to manual startup and shut them off:
World wide web service
Microsoft Single Sign-on Service
Windows Sharepoint Services Search

Restart spadmin and sptimer services

If needed: Command line with C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN>psconfig.exe -cmd upgrade -inplace b2b -wait -force

Using WSPBuilder and SharePoint solution generator for Creating a List Instance in MOSS2007

June 17, 2011 12 comments

In this post I am going to explain how we can make use of WSPBuilder for creating a List instance.
First we need to install SharePoint Solution Generator. You can download the same from here
http://download.microsoft.com/download/4/0/b/40b62080-6295-4d63-b396-d779fb9b4449/VSeWSSv12.exe
Now follow the steps for generating List Definition. Here I am going to create a List Definition of a List named “Configurations”
Start SharePoint solution generator

Select List Definition and click on Next button


Specify the Site Url where the list is present and click Next


Select the List and click Next


Provide a project name and path, then click Next

Click Finish

Before clicking Exit, click “Click here to open the generated solution” and click Exit

You can see the “Configurations” folder. Let it be opened. Now open visual studio and create a WSPBuilder project

Once the project is created, add a new blank feature

Now, copy the folder “Configurations” and paste it under the feature folder as shown below

Open the ListDefinition.xml file and copy the following content


Once the content is copied, paste it in the elements.xml file as shown below and delete the file “ListDefinition.xml” from visual studion project

You can also see ListInstance, make a similar entry in your elements.xml file. Also replace the FeatureId with the FeatureId specified in the feature.xml file
Now build the wsp, deploy it and activate the feature. This will add the list to the site.
Hope this was helpful!!!

Create an Ajax Web Part for MOSS2007


For creating Ajax Web part in MOSS2007, firstly we need to enable Ajax in SharePoint 2007. We need to edit web.config of the web applications of SharePoint 2007 to support AJAX.

We will add multiple sections in web.config file as the following

1-      Add the following entries under  <configSections> 

<sectionGroup name=”system.web.extensions”type=”System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″>     

 

<sectionGroup name=”scripting”type=”System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35″>       

 

<section name=”scriptResourceHandler” type=”System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ requirePermission=”false” allowDefinition=”MachineToApplication” /> 

 

<sectionGroup name=”webServices” type=”System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″>

 <section name=”jsonSerialization” type=”System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ requirePermission=”false” allowDefinition=”Everywhere” /> 

 

<section name=”profileService” type=”System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ requirePermission=”false” allowDefinition=”MachineToApplication” /> 

 

<section name=”authenticationService” type=”System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ requirePermission=”false” allowDefinition=”MachineToApplication” />

 

</sectionGroup>

</sectionGroup>

</sectionGroup

 

2-      Add the following entries under <pages>

<controls>

<add tagPrefix=”asp” namespace=”System.Web.UI”assembly=”System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />

</controls> 

 

 

 

 

3-      add the following entries under <compilation><assemblies>

<add assembly=”System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />

 

4-    add the following entries under <httpHandlers>

<add verb=”*” path=”*.asmx” validate=”false”type=”System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />     

 

<add verb=”*”path=”*_AppService.axd” validate=”false”type=”System.Web.Script.Services.ScriptHandlerFactory, SSystem.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />     

 

<add verb=”GET,HEAD”path=”ScriptResource.axd”type=”System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ validate=”false” />

 

5-    add the following entries under <httpModules>

<add name=”ScriptModule” type=”System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />

 

6-    at the end of the web.config and before <configuration> add the following:

<system.web.extensions>

    <scripting>     

       <webServices>        <!– Uncomment this line to enable the authentication service. Include requireSSL=”true” if appropriate. –>        <!–        <authenticationService enabled=”true” requireSSL = “true|false”/>      –>        <!– Uncomment these lines to enable the profile service. To allow profile properties to be retrieved and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and writeAccessProperties attributes.–>        <!–      <profileService enabled=”true”                      readAccessProperties=”propertyname1,propertyname2″                      writeAccessProperties=”propertyname1,propertyname2″ />      –>     

</webServices>

 <!–<scriptResourceHandler enableCompression=”true” enableCaching=”true” /> –>   

</scripting> 

</system.web.extensions> 

<system.webServer>   

<validation validateIntegratedModeConfiguration=”false” />

<modules> 

<add name=”ScriptModule” preCondition=”integratedMode”type=”System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″/>

</modules>

<handlers> 

<removename=”WebServiceHandlerFactory-Integrated” /> 

 

<addname=”ScriptHandlerFactory” verb=”*” path=”*.asmx”preCondition=”integratedMode”type=”System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />

<addname=”ScriptHandlerFactoryAppServices” verb=”*”path=”*_AppService.axd” preCondition=”integratedMode”type=”System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />

<addname=”ScriptResource” preCondition=”integratedMode”verb=”GET,HEAD” path=”ScriptResource.axd”type=”System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ /> 

</handlers> </system.webServer> 

7-    add the following entry under <SafeControls> section

<SafeControl Assembly=”System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″Namespace=”System.Web.UI” TypeName=”*” Safe=”True” /> 

 

 

 

 

Understanding and working with the Web Part Verbs

Here, I display what are the web part verbs and how we can implement it in web part code.

Web part verb is an action rendered in the web part menu by the web part frame work as part of the chrome which rendered a rounded the  web part.

The verbs can do server side or client side actions.To implement verbs in web parts we need to override verbs property.

Let us display an example about web part verbs:-

This is a simple example to illustrate the role of web verbs, I’ll add a verb called “Change Button Tile”, as below screen shoot when we click on this verb a server side handler to change button text form “Before click on verbs”

to “After click on verbs”

Here’s the implementation of Web Part Verbs

As web said above web part verb is an action which can call a client-side function or a server-side handler. Here we add server side handler.

To add Web Part Verbs as menu items, override the Verbs property of the Web Part. The Verbs property returns a read-only WebPartVerbCollection, so you will need to merge a collection of Verbs with the base.Verbs property to create a new WebPartVerbCollection

Here as I said, I have implemented a server side handler for change button title, as the following

Comparison between workflow created using SharePoint Designer and Visual Studio Designer for Windows Workflow Foundation

SharePoint Designer

Visual Studio Designer for Windows Workflow Foundation.
Can write only sequential workflows. Can write both sequential and state machine workflows.
 Automatic deployment against the specific list or library against which workflow is being designed. Can be deployed as a feature.
Logic is defined declaratively using Steps which comprises of Conditions and Actions Logic could be defined through custom code written using C# or VB.NET.
Workflows could be associated to a specific list or library. Workflow can be authored as Template which once deployed could be associated with any list or library.
Workflow modifications not possible. Workflow modifications are possible using Modification forms built using ASP.NET or InfoPath form.
Workflow markup, rules all are stored as a document library on the site. Workflows are compiled as an .NET assembly.
Can’t be debugged. Debugging is possible using Visual Studio.
ASP.NET Forms only can be used as an input form

ASP.NET and InfoPath  Forms can be used as input forms

references:-
http://nishantrana.wordpress.com/2009/02/11/difference-between-workflow-created-using-sharepoint-designer-and-visual-studio-designer-for-windows-workflow-foundation/