EditModePanel is perfect to add your own style or control in the edit mode form of publishing webs.

You can use it to add your own CSS file in the edit mode. 



Gets or sets a value that indicates whether this control is visible in Edit mode or Display mode.
Gets or sets a value that indicates whether this control will render an outer <DIV> element.

more info on this MSDN http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.webcontrols.editmodepanel.aspx



Tags: , | Categories: SharePoint Development

The SharePoint Config log DB can grow quite large!

The following way can help you shrink the config databases. But do only use these in test or development enviroments!

SharePoint 2010 on SQL 2008 R2

  1. Right click on you DB -> Properties
  2. Select Options
  3. Change the Recovery Model to SIMPLE and Click Ok
Once that is done ,
-Right click on DB -> Tasks - > Shrink -> Files
- In File type select log and click OK
Note : Simple recovery model is not suggested for Production Systems

SharePoint 2007 on SQL 2005

Make two new Queries

USE [SharePoint_Config]

DBCC SHRINKFILE (N’SharePoint_Config_log’ , 50)

Tags: , , | Categories: Database | SharePoint Development

When trying to deploy a SharePoint solution in Visual Studio 2010 folowing errors can occur:

Error 1 Error occurred in deployment step 'Retract Solution': The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.

Solution: make the account you are running Visual Studio a member of the db_owner role on the sharepoint_config and sharepoint_admin databases.


Error 1 Error occurred in deployment step 'Activate Features': Cannot start service SPUserCodeV4 on computer '...'.

Solution: go into Central Administration, select System Settings, select Manage services on server. Find the 'Microsoft SharePoint Foundation Sandbox Code Service' and click Start.

Tags: , | Categories: IDE | SharePoint Development | Tips and tricks

Ever run in to problems with SharePoint and to long url or problems with uploading documents deep down the file map path?

I have and I found some pretty stange limits.

The Office programs Excel and Word have different limitations when it comes to storing documents in SharePoint.
In a SharePoint document library with a long URL path there is a difference in the length of file names that can be saved.

  • Word can´t handle more than 262 characters in the URL. Incl. path and file name
  • Excel can´t handle more than 218 characters in the URL. Incl. path and file name
The reason that there even can exist as long paths to an Excel sheet is that the above limit only applies when you save the document from Excel / Word and not when you upload it with the send button or using the the Explorer view.
There is even an different transfer limit on the 2 ways to transfer documents, but thats another day.
General restrictions:
URL path for all files and folders to be less than 260 characters and must not exceed 128 characters in each file or folder name in the URL path.
But this is not when you save the document from Excel!
Tags: , , , , | Categories: SharePoint Configuration | SharePoint Development | Tips and tricks