Monday, 6 July 2009

unrecognized configuration section 'connectionstrings'

When hosting a website in IIS you may get the error below when trying to view the page in IE.

unrecognized configuration section 'connectionstrings'

One of the reasons for this maybe because in IIS, the website is configured as a .Net 1.1 application rather than .Net 2.0, to fix this, right click on the website application in IIS and choose properties and click on the ASP.Net tab and choose the ASP.Net version to be 2.0!

Tuesday, 9 June 2009

data view web part This page allows a limit of 200 controls DataFormwebPart

When working with the Dataview web part I got the error below
This page allows a limit of 200 controls....

I experienced this when adding a lot of "Related Data Sources". I tried adding the dataview web part created using multiple document libraries on a number of pages but got the same error.

But once I started from scratch again and created the first data source and added the "Related Data Sources" one by one again, it seemed to work, no idea why!

Friday, 22 May 2009

Updating SharePoint Menu

Updating SharePoint Dropdown Menu Text, updating defailt text in SharePoint like "Change Site Settings", "Manage Users", etc.

If you absolutely want to change the text that appears on Dropdown lists in SharePoint, for example things like below, you can edit the Core.JS and OWS.js files in the 12 hive at the location C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033.

But please be aware that this is not a recommended process because if you get any SharePoint updates or migrate sites from one server to another server you would loose these changes. But putting down here anyway!

var L_Edit_Text="Edit";
var L_ViewItem_Text="View Item";
var L_EditItem_Text="Edit Item";
var L_EditSeriesItem_Text="Edit Series";
var L_DeleteItem_Text="Delete Item";
var L_DeleteDocItem_Text="Delete";
var L_ViewProperties_Text="View Properties";
var L_EditProperties_Text="Edit Properties";
var L_ViewResponse_Text="View Response";
var L_EditResponse_Text="Edit Response";
var L_DeleteResponse_Text="Delete Response";
var L_Subscribe_Text="Alert Me";
var L_CustomizeNewButton_Text="Change New Button Order";
var L_Review_Text="Send for Review";
var L_EditIn_Text="Edit in ^1";
var L_EditInApplication_Text="Edit Document"
var L_Checkin_Text="Check In";
var L_Checkout_Text="Check Out";
var L_DiscardCheckou_Text="Discard Check Out";
var L_CreateDWS_Text="Special Activity Workspaces";
var L_PublishBack_Text="Publish to Source Location";
var L_Versions_Text="Version History";
var L_WorkOffline_Text="Connect to Client";
var L_Reply_Text="Reply";
var L_ExportContact_Text="Export Contact";
var L_ExportEvent_Text="Export Event";
var L_Reschedule_Text="Rescheduling Options";
var L_Move_Text="Move";
var L_Keep_Text="Keep";
var L_Delete_Text="Delete";
var L_Open_Text="Open";
var L_SiteSettings_Text="Change Site Settings";
var L_ManageUsers_Text="Manage Users";
var L_DeleteSite_Text="Delete Site";
var L_SiteStorage_Text="Manage Site Storage";
var L_MngPerms_Text="Manage Permissions";
var L_Settings_Text="Settings";
var L_Remove_Text="Remove from this list";
var L_ModerateItem_Text="Approve/reject";
var L_PublishItem_Text="Publish a Major Version";
var L_CancelPublish_Text="Cancel Approval";
var L_UnPublishItem_Text="Unpublish this version";
var L_DownloadOriginal_Text="Download Picture";
var L_EditVersion_Text="Edit";
var L_EditInOIS_Text="Edit Picture";
var L_Workflows_Text="Workflows";
var L_Send_Text="Send To";
var L_ExistingCopies_Text="Existing Copies";
var L_OtherLocation_Text="Other Location";
var L_GoToSourceItem_Text="Go to Source Item";
var L_NotifyThisIsCopy_Text="This item was copied from another location and may be receiving updates from there. You should make sure that the source stops sending updates or this item may get recreated.\n\n";
var L_SendToEmail_Text="E-mail a Link";
var L_DownloadACopy_Text="Download a Copy";
var L_DocTran_Text="Convert Document";
var L_AddToMyLinks_Text="Add to My Links";
var L_AddToCategory_Text="Submit to Portal Area";
var L_VS_DownArrow_Text="Select a View";
var L_ModifyView="Modify this view";
var L_CreateView="Create a new view";

SharePoint Backup Restore

To migrate a sharepoint site from one server to another server follow these steps

1. Log into the SharePoint server using an account that has admin rights (or relevant permissions) to the SharePoint server and SQL Databases
2. if stsadm is not recognised in your command prompt, go to the 12 hive directory, for me stsadm is found at the location cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN and run stsadm from this folder
3. Create a new web application using central admin in the server where you want to restore the backup - http://CENTRAL-ADMIN-URL-GOES-HERE/_admin/extendvs.aspx
4. No need to create a Site Collection

Using command prompt type the following line to backup

stsadm -o backup -url http://sharepointsite/ -filename c:\sharepointsitenamebackup.bak -backupmethod full

Use the following line to restore, WARNING - Using overwrite as per the command below will delete any existing site that you have on the url that you are restoring to!

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm -o restore -url http:// -filename c:\sharepointsitenamebackup.bak -restoremethod overwrite


To check the version of your SharePoint site use the url http:///_admin/FarmServers.aspx.

If you get the error below, it is because you have an older version from the server where you have copied the backup from..

"Your backup is from a different version of Windows SharePoint Services and cannot be restored to a server running the current version. The backup file should be restored to a server with version '12.0.0.6219' or later." - See this site for info on this http://www.allbhu.com/Global/Default.aspx?tabid=88&EntryID=3

Wednesday, 12 November 2008

The form has been closed. Xmlformview web part

When addding the xmlformview web part to a sharepoint page, you may get an error that fills the full page saying "The form has been closed". Since this error fills up the full page you will not be able to edit the properties of the web part that you have just added.

To fix this problem follow the steps below.

1. Navigate to the page library where the web part page is located
2. Click on the options on the page and click "Edit Properties"
3. At the bottom of the properties page, click on "Web Part Page Maintenance".
4. Using the web part maintenance page close the xmlformview web part
5. Go back to the page where you added the web part and click on add a webpart
6. Instead of choosing the xmlformview web part from the web part list click on advanced and select the xmlformview web part from the "Closed Web parts" list
7. Now the web part would be added and the web part properties displayed
8. Edit the web part properties and add the url of the infopath form in the xsn location field in the Data category
9. In the Feature Catergory set the editing status dropdown value to "editing"

Other websites recommend you to add the xmlformview web part again from the main list after closing the web part that you added first but that did not work for me.

Tuesday, 11 November 2008

Console Configuration File Error: XML Exception: Object reference Sharepoint

If you get the error below in your event viewer
Console Configuration File Error: XML Exception: Object reference not set to an instance of an objet

and the message Object reference not set to an instance of an object! at the area where you would expect your page editing toolbar then the reason is that the xml files in Editing Menu folder in the Master Page gallery are not in the Published state.

To fix this, just publish all the xml files in the folder Editing Menu and approve them!

Tuesday, 23 September 2008

Customising Ontolica Search

As you know when you instal Ontolica on a Moss box it overrides the default sharepoint delegate search control with ID "SmallSearchInputBox", this is the searchbox that we are customising below.

To customise ontolica search, i.e. to change the search magnifying image button or to change the css classes you just need to modify the xslt file that ontolica uses.

This can be found in the location RootSite/OntolicaStyles/Forms/Allitems.aspx and open the folder SearchBox and edit the default.xslt file in here...you can change the images, change the borders around the search boxes etc.

You do not need to do an IISRESET but it seems to take a while before the changes are reflected on the page so if it is a dev box do an IISRESET to see the changes immediately.