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

When compiling a project in Visual Studio, I got the error message

"the exec task needs a command to execute"

, with no line number or anything.


Check the "build Events" in the project properties.
The error is caused by a newline character in the pre or post build text fields.

This applies to Visual Studio 2005, 2008 and 2010!

Tags: | Categories: IDE | Tips and tricks | Web 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

Problems when trying to open a SharePoint Document Library in explorer view from Windows?

With errors like:

“Your client does not support opening this list with Windows Explorer.”

or in danish

”Klienten understøtter ikke åbning af denne liste med Windows Stifinder.”

Explorer view uses the WebDav protocol to connect to SharePoint from the client.

In Windows 7 or Windows Vista
Ensure the WebClient service is not disabled. The WebClient service is critical to the Open in Windows Explorer feature.

If already running and still not working try to restart the service.

In Windows Server 2008
The Windows Server is not designed to be a client and the WebDav client is not installed or enabled by default.
In order to enable the WebDav client on a server simply enable the Desktop Experience feature.

Tags: , | Categories: SharePoint Configuration | Tips and tricks

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
To create the asp.net membership database, please follow the steps below.
  1. Find the setup file aspnet_regsql.exe located at either of the following locations depending upon your OS:
  2. When the ASP.NET SQL Server Setup Wizard appears, select “Configure SQL Server for application services”, then click Next
  3. Enter the SQL Server and Database name.
  4. Click Next and Finish

  To run the command line version of aspnet_regsql.exe, you need to open a command prompt and run this command, which will create the proper database tables for the membership database.
-- To use SQL Server credentials (a UserID and Password), use:

aspnet_regsql.exe -S <server> -U <login id> -P <password> -d <database> -A all
Tags: , , | Categories: Database | Tips and tricks | Web development

It all began while restarting the Office SharePoint Server Search service. I got the error

"The handle is invalid"

I tried modifying the Log On Identity of the service.  Changing this to "Local System", the service started without any errors. But being in a server farm this provided me with:

“The search request was unable to connect to the Search Service”

or actually it was in danish

”Søgeanmodningen kunne ikke oprette forbindelse til søgetjenesten.”

1. Maybee the Accounts used to search dont have the right access needed or the Search services is not running. Check the services; Office SharePoint Server Search and Windows SharePoint Services Search
2. Search server settings
Go to Central Admin > Operations > Services on Server > Office SharePoint Server Search Service Setting -> "User this server for serving search queries”

Thank you:





Tags: , | Categories: SharePoint Configuration

If you get the following error when trying to run a search on a WSS site:

Your search cannot be completed because this site is not assigned to an indexer.
Contact your administrator for more information.

or in danish

Din søgning kan ikke fuldføres, da dette websted ikke er tildelt et indekseringsprogram.
Kontakt administratoren for at få flere oplysninger.

You'll need to set the indexer on the content database of the site collection. This is done by going to the Central Adminstration > Application Management > Content Databases. Then choose the database of your site and set the index server.

This is the same thing with the Search Server 2008 Express added.


Thank you Paul Wu



Tags: , , , | Categories: SharePoint Configuration

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