Thursday, December 18, 2014

Microsoft.ServiceBus.Messaging.MessagingException: The current SQL store provider assembly is out-of-date and no longer compatible with the installed SQL logic and schema. Update the SQL store provider assembly to version '2.13.0.0' or greater

When ever you see this error:  Microsoft.ServiceBus.Messaging.MessagingException: The current SQL store provider assembly is out-of-date and no longer compatible with the installed SQL logic and schema. Update the SQL store provider assembly to version '2.13.0.0' or greater




That means you'll need to install the higher version of the Workflow Manager. 

Troubleshoot Workflow in SharePoint 2013

Get logs from Service Bus:


Run Powershell:  Get-SBClientConfiguration
Get the Connection string.
Please download Service Bus Explorer from the below link-




 


you will find the Service Bus Explorer.exe tool in Service Bus Explorer\C#\bin\Debug\ folder


  1. Please run the tool as admin- > File- > connect- >Select “Enter connection String ” from the dropdown (“Service Bus Namespace”).
  2. Paste the connection string from the powershell Get-SBClientConfiguration
  3. Click on “OK”
------------------------------------------------------------------


Get logs from workflow:


-copy the command below (between the dashed lines) to a file and save as logcapture.cmd
-open command prompt and go to the folder of where you saved logcapture.cmd
-type:  logcapture start
-let it finish
-run the test/workflows, etc
-type:  logcapture stop
-your logs will be in the Logs folder
---------------------


@echo off


if not exist .\Logs (


mkdir .\Logs


)


if /i "%1"=="stop" (


goto :Stop


)


if /i "%1"=="start" (


goto :StartClean


)


exit /b 0


:Stop


ECHO Please wait...


WMIC /OUTPUT:.\logs\ProcessListE.txt PROCESS get Caption,Commandline,Processid


logman stop ServiceBusClientTracing -ets > NUL:


logman stop ServiceBusTracing -ets > NUL:


logman stop WorkflowTracing -ets > NUL:


logman stop WindowsFabric -ets > NUL:


logman stop WindowsFabricLease -ets > NUL:


wevtutil epl Application .\logs\application.evtx


wevtutil epl System .\logs\system.evtx


wevtutil epl Security .\logs\security.evtx


IF NOT EXIST "C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS\NUL" GOTO END


FOR /F %%i IN ('dir /b /a-d-h /o-d "C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS" ') DO (


SET a=%%i


goto :COPY


)


:COPY


SET b="C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS\"


SET file=%b%%a%


Copy %file% .\Logs\ > nul 2>&1


:END


ECHO The command completed successfully.


exit /b 0


:StartClean


ECHO Please wait...


del /F /S /Q .\Logs\*.* > NUL:


logman stop ServiceBusClientTracing -ets > NUL:


logman stop ServiceBusETWTracing -ets > NUL:


logman stop WorkflowETWTracing -ets > NUL:


logman stop WindowsFabric -ets > NUL:


logman stop WindowsFabricLease -ets > NUL:


REM cscript //nologo productlist.vbs > .\logs\productlist.txt


wmic /OUTPUT:.\logs\productlist.txt product get Description,Version,InstallDate


wmic /OUTPUT:.\logs\hotfixlist.txt qfe get HotFixID,Description,InstalledOn


WMIC /OUTPUT:.\logs\ProcessListS.txt PROCESS get Caption,Commandline,Processid


REM logman start ServiceBusClientTracing -p "Microsoft-ServiceBus-Client" 0xFF0000000000 0x4 -nb 256 1024 -bs 512 -ets -ct perf -f bincirc -max 1000 -o .\Logs\ServiceBusClientTrace.etl


logman start ServiceBusClientTracing -p {a307c7a2-a4cd-4d22-8093-94db72934152} -bs 64 -nb 120 320 -ets -ct perf -f bincirc -max 1000 -o .\Logs\ServiceBusClientTrace.etl


 


REM logman start ServiceBusTracing -p "Microsoft-ServiceBus" 0xFF0000000000 0x4 -nb 256 1024 -bs 512 -ets -ct perf -f bincirc -max 1000 -o .\Logs\ServiceBusTrace.etl


logman start ServiceBusTracing -p {3d05219e-3959-41c4-a2a7-ea6ca5b5c257} -bs 64 -nb 120 320 -ets -ct perf -f bincirc -max 1000 -o .\Logs\ServiceBusTrace.etl


logman start WorkflowTracing -p {B2885F6E-231C-43FF-BBEA-7516148FF6FE} -bs 64 -nb 120 320 -ets -ct perf -f bincirc -max 1000 -o .\Logs\WorkflowTrace.etl


logman start WindowsFabric -p {CBD93BC2-71E5-4566-B3A7-595D8EECA6E8} -bs 64 -nb 120 320 -ets -ct perf -f bincirc -max 1000 -o .\Logs\WindowsFabric.etl


logman start WindowsFabricLease -p {3F68B79E-A1CF-4B10-8CFD-3DFE322F07CB} -bs 64 -nb 120 320 -ets -ct perf -f bincirc -max 1000 -o .\Logs\WindowsFabricLease.etl


 


exit /b 0
------------------------------------------------------



Monday, December 15, 2014

Convert an ETL file to a readable CSV file

tracerpt filename.etl -o output.csv -of CSV

http://technet.microsoft.com/en-us/library/cc732700.aspx


Wednesday, September 24, 2014

DatePicker not working correctly on sharepoint 2013

Ran into a strange issue today with all date picker on the site showing an unusable calendar.   After searching what could the issue be from custom css and custom master page, it was the theme.  I just reran the design manager and all good.  




Wednesday, September 17, 2014

SharePoint Configuration wizard error after an Cummulative Update (CU) or service pack (SP) install: Solution Dismount database then run wizard then remount DB



When you have large content databases on your web application, the Configuration Wizard can error out or just never seem to finish.




If that is the case, you can un-mount the content databases then run the wizard, then re-mount the databases with the script that is produced by the script below.  don't forget to replace the <<DatabaseServer>>   with your database server name.  ex.  mySQLServer.mydomain.com
and


















Add-PSSnapin Microsoft.SharePoint.Powershell


$data = Get-SPContentDatabase


foreach($d in $data)
{
    write-host 'Dismount-SPContentDatabase -Identity' $d.Id ' -WarningAction SilentlyContinue'
}

foreach($d in $data)
{
    write-host 'Mount-SPContentDatabase -Name '$d.Name '-WebApplication '$d.WebApplication.Url' -DatabaseServer <<DatabaseServer>> -WarningAction SilentlyContinue'
}


Tuesday, September 9, 2014

SharePoint Error in people picker in Infopath filler for SSL termination at F5 rather than at the web application/IIS level

The error occurs in the InfoPath filler people picker:  calls fails /_vti_bin/spclaimproviderwebservice.https.svc


when the SSL termination is done at the F5. 


To resolve, you'll need to create a iRule in F5 or in IIS to strip of the .https for the following two services:


spclaimproviderwebservice.https.svc
and
cellstorage.https.svc

IIS:

<rule name="SpClaimProviderWebService" stopProcessing="true">
<match url="^(.*)spclaimproviderwebservice.https.svc$" />
<action type="Rewrite" url="{R:1}spclaimproviderwebservice.svc" />
</rule>


<rule name="cellStorage" stopProcessing="true">
<match url="^(.*)cellstorage.https.svc$" />
<action type="Rewrite" url="{R:1}cellstorage.https.svc" />
</rule>


F5:


when HTTP_REQUEST {
if { [[string tolower] [HTTP::path]] contains "spclaimproviderwebservice.https.svc"} {
HTTP::path [string map {.https ""} [HTTP::path]]
}
}
when HTTP_REQUEST {
if { [[string tolower] [HTTP::path]] contains "cellstorage.https.svc"} {
HTTP::path [string map {.https ""} [HTTP::path]]
}
}

Tuesday, September 2, 2014

SharePoint 2013 Infopath browser form, people picker error in IE 11: JSON is undefined

This is a strange compatibility issue so have a ticket open with Microsoft so will update with the real fix (i'm assuming that it will be a hot fix).

When you open a people picker in IE 11 for a infopath form in the browser, the error get's thrown, JSON is undefined.

the temporary fix is to add teh following to the pickerdialog.master in the layouts folder.

Add this to the top of the page:
<!DOCTYPE html>


Replace the meta tag where it has
<meta http-equiv="X-UA-Compatible" content="IE=10" />

with the following:

 <meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" />
<!--[if lt IE 9]>
 <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
 <script src="http://code.jquery.com/jquery-2.0.3.js"></script>
<!--<![endif]-->

Save.

Test your people picker on infopath browser form.

Monday, August 25, 2014

SharePoint 2013 SP or CU error install error: An error occurred while running detection

While installing SP1 or any other CU, the error pops up saying that an "error occurred while running detection".

There are a lot of articles out there to run the repair on SharePoint, run the configuration, etc.  but none of those worked.   

Hmmm... so i decided to unpack the SP1 and create a batch file and run the msp files on all the servers, then run the configuration and wooo  hooo.   
Everything works (installing the CU, or SP no more problems).    

Here is the example for SP1:  the contents of the batch files that i created with SP1:

Officer server:  I extracted it to D:\off\
with the command:   officeserversp2013-kb2880552-fullfile-x64-en-us.exe /extract:"D:\off"  

D:\off\acsrvmuisp-en-us.msp /quiet
D:\off\acsrvwfesp-x-none.msp /quiet
D:\off\coreservermuisp-en-us.msp /quiet
D:\off\coreserversp-x-none.msp /quiet
D:\off\edumuisp-en-us.msp /quiet
D:\off\eduwfesp-x-none.msp /quiet
D:\off\ifsmuisp-en-us.msp /quiet
D:\off\ifswfesp-x-none.msp /quiet
D:\off\lpsrvmuisp-en-us.msp /quiet
D:\off\lpsrvwfesp-x-none.msp /quiet
D:\off\oserversp-x-none.msp /quiet
D:\off\osfservermuisp-en-us.msp /quiet
D:\off\osfserversp-x-none.msp /quiet
D:\off\ppsmamuisp-en-us.msp /quiet
D:\off\ppsmawfesp-x-none.msp /quiet
D:\off\pptservermuisp-en-us.msp /quiet
D:\off\pptserversp-x-none.msp /quiet
D:\off\smsmuisp-en-us.msp /quiet
D:\off\smssp-x-none.msp /quiet
D:\off\sqlemuisp-en-us.msp /quiet
D:\off\stssp-x-none.msp /quiet
D:\off\svrproofsp-en-us.msp /quiet
D:\off\svrproofsp-ar-sa.msp /quiet 
D:\off\svrproofsp-az-latn-az.msp /quiet
D:\off\svrproofsp-bg-bg.msp /quiet
D:\off\svrproofsp-bs-latn-ba.msp /quiet
D:\off\svrproofsp-ca-es.msp /quiet
D:\off\svrproofsp-cs-cz.msp /quiet
D:\off\svrproofsp-cy-gb.msp /quiet
D:\off\svrproofsp-da-dk.msp /quiet
D:\off\svrproofsp-de-de.msp /quiet
D:\off\svrproofsp-el-gr.msp /quiet
D:\off\svrproofsp-es-es.msp /quiet
D:\off\svrproofsp-et-ee.msp /quiet
D:\off\svrproofsp-eu-es.msp /quiet
D:\off\svrproofsp-fi-fi.msp /quiet
D:\off\svrproofsp-ga-ie.msp /quiet
D:\off\svrproofsp-gl-es.msp /quiet
D:\off\svrproofsp-gu-in.msp /quiet
D:\off\svrproofsp-he-il.msp /quiet
D:\off\svrproofsp-hr-hr.msp /quiet
D:\off\svrproofsp-id-id.msp /quiet
D:\off\svrproofsp-it-it.msp /quiet
D:\off\svrproofsp-kk-kz.msp /quiet
D:\off\svrproofsp-kn-in.msp /quiet
D:\off\svrproofsp-ko-kr.msp /quiet
D:\off\svrproofsp-lt-lt.msp /quiet
D:\off\svrproofsp-lv-lv.msp /quiet
D:\off\svrproofsp-mk-mk.msp /quiet
D:\off\svrproofsp-mr-in.msp /quiet
D:\off\svrproofsp-ms-bn.msp /quiet
D:\off\svrproofsp-ms-my.msp /quiet
D:\off\svrproofsp-nb-no.msp /quiet
D:\off\svrproofsp-nl-nl.msp /quiet
D:\off\svrproofsp-nn-no.msp /quiet
D:\off\svrproofsp-pa-in.msp /quiet
D:\off\svrproofsp-pl-pl.msp /quiet
D:\off\svrproofsp-pt-br.msp /quiet
D:\off\svrproofsp-ro-ro.msp /quiet
D:\off\svrproofsp-ru-ru.msp /quiet
D:\off\svrproofsp-sk-sk.msp /quiet
D:\off\svrproofsp-sl-si.msp /quiet
D:\off\svrproofsp-sr-cyrl-cs.msp /quiet
D:\off\svrproofsp-sv-se.msp /quiet
D:\off\svrproofsp-sr-latn-cs.msp /quiet
D:\off\svrproofsp-ta-in.msp /quiet
D:\off\svrproofsp-te-in.msp /quiet
D:\off\svrproofsp-th-th.msp /quiet
D:\off\svrproofsp-tr-tr.msp /quiet
D:\off\svrproofsp-uk-ua.msp /quiet
D:\off\svrproofsp-ur-pk.msp /quiet
D:\off\svrproofsp-vi-vn.msp /quiet
D:\off\svrproofsp-zh-cn.msp /quiet
D:\off\vsrvmuisp-en-us.msp /quiet
D:\off\vsrvwfesp-x-none.msp /quiet
D:\off\wasrvmuisp-en-us.msp /quiet
D:\off\wasrvwfesp-x-none.msp /quiet
D:\off\wdsrvmuisp-en-us.msp /quiet
D:\off\wdsrvsp-x-none.msp /quiet
D:\off\wssmuisp-en-us.msp /quiet
D:\off\xlsrvmuisp-en-us.msp /quiet
D:\off\xlsrvwfesp-x-none.msp /quiet



Project server:  I extracted it to D:\proj\
with the command:   projectserversp2013-kb2880553-fullfile-x64-en-us.exe /extract:"D:\proj"

D:\proj\projectservermuisp-en-us.msp
D:\proj\projectserverwfesp-x-none.msp
D:\proj\pserversp-x-none.msp


Language Pack:  I extracted it to D:\lang\
with the command:   serverlpksp2013-kb2880554-fullfile-x64-en-us.exe /extract:"D:\lang"

D:\lang\acsrvmuisp-en-us.msp /quiet
D:\lang\coreservermuisp-en-us.msp /quiet
D:\lang\edumuisp-en-us.msp /quiet
D:\lang\ifsmuisp-en-us.msp /quiet
D:\lang\lpsrvmuisp-en-us.msp /quiet
D:\lang\osfservermuisp-en-us.msp /quiet
D:\lang\osmuisp-en-us.msp /quiet
D:\lang\ppsmamuisp-en-us.msp /quiet
D:\lang\pptservermuisp-en-us.msp /quiet
D:\lang\projectservermuisp-en-us.msp /quiet
D:\lang\smsmuisp-en-us.msp /quiet
D:\lang\svrproofsp-ar-sa.msp /quiet
D:\lang\svrproofsp-az-latn-az.msp /quiet
D:\lang\svrproofsp-bg-bg.msp /quiet
D:\lang\svrproofsp-bs-latn-ba.msp /quiet
D:\lang\svrproofsp-ca-es.msp /quiet
D:\lang\svrproofsp-cs-cz.msp /quiet
D:\lang\svrproofsp-cy-gb.msp /quiet
D:\lang\svrproofsp-da-dk.msp /quiet
D:\lang\svrproofsp-de-de.msp /quiet
D:\lang\svrproofsp-el-gr.msp /quiet
D:\lang\svrproofsp-en-us.msp /quiet
D:\lang\svrproofsp-es-es.msp /quiet
D:\lang\svrproofsp-et-ee.msp /quiet
D:\lang\svrproofsp-eu-es.msp /quiet
D:\lang\svrproofsp-fi-fi.msp /quiet
D:\lang\svrproofsp-fr-fr.msp /quiet
D:\lang\svrproofsp-ga-ie.msp /quiet
D:\lang\svrproofsp-gl-es.msp /quiet
D:\lang\svrproofsp-gu-in.msp /quiet
D:\lang\svrproofsp-he-il.msp /quiet
D:\lang\svrproofsp-hi-in.msp /quiet
D:\lang\svrproofsp-hr-hr.msp /quiet
D:\lang\svrproofsp-hu-hu.msp /quiet
D:\lang\vsrvmuisp-en-us.msp /quiet
D:\lang\wasrvmuisp-en-us.msp /quiet
D:\lang\wdsrvmuisp-en-us.msp /quiet
D:\lang\wssmuisp-en-us.msp /quiet
D:\lang\xlsrvmuisp-en-us.msp /quiet
D:\lang\xsmuisp-en-us.msp /quiet

--------------------------------------------------------------








Tuesday, August 5, 2014

Sharepoint List view showing raw html

This is a simple fix.  Modify the webpart settings:

Go to Miscellaneous:

Check the "Server Render"

Ok or Apply.

Stop editing the page.

Done!!!!

:)

Tuesday, July 29, 2014

Create a new the crawl database and replace the old or corrupted crawl database in SharePoint 2013 Search

Recently the crawl database in sharepoint search got corrupted.   After we fixed the indexes, it kept getting corrupted so we just recreated the database and the issues went away.  Here are the steps and power shell.


#You will need to change the search service application name, also your sql server name, and the guid of you crawl store. 




Add-PSSnapin Microsoft.SharePoint.PowerShell


#List all crawl database:


Get-SPEnterpriseSearchCrawlDatabase -SearchApplication "Search service Application"




#Create a new Crawl database: 

New-SPEnterpriseSearchCrawlDatabase -DatabaseName "Search_Service_Application_CrawlStoreDB" -DatabaseServer "SQLServerName" -SearchApplication "Search Service Application"




#Delete the crawl store that is corrupted or old.

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search service Application"
$cs = $ssa.CrawlStores


#list the crawl stores to find the corrupted or old one

$cs


#delete the old/corrupted store


$cs1 = $cs.Item("GUID of Old database")
$cs1.Delete()




# if the search is in a System paused for refactoring, use the command below to normal


#$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search service Application"
#$ssa.ForceResume($ssa.IsPaused())



Wednesday, June 25, 2014

SharePoint 2010 Custom Workflow Actions in SharePoint 2013

After upgrading the error comes up that the action can not load the class.  

Error:  Could not deserialize object. The type 'MyCustom.WorkflowActions.StartAworkflowOnAnotherList' could not be resolved.

Before in 2010:

<System.Workflow.ComponentModel.WorkflowCompiler>
    <authorizedTypes>
          <authorizedType .....>

In SharePoint 2013 after the upgrade which causes this break:

<System.Workflow.ComponentModel.WorkflowCompiler>
    <authorizedTypes>
      <targetFx version="v4.0">
      </targetFx>
       <authorizedType Assembly="MyCustom.WorkflowActions.StartAworkflowOnAnotherList.....>


To fix:

<System.Workflow.ComponentModel.WorkflowCompiler>
    <authorizedTypes>
      <targetFx version="v4.0">
            <authorizedType Assembly="MyCustom.WorkflowActions.StartAworkflowOnAnotherList.....>
      </targetFx>
       

Thursday, February 20, 2014

SharePoint 2010 and SCOM 2012 R2 with APM starts csc.exe instances which overloads the server resources. SCOM 2012 R2 with APM errors with .NET 2.0

The WFE servers resources get overloaded or maxed out with instances of csc.exe running when a site is called.  No real errors are displayed in the event viewer.
Pages do not get loaded due to time outs with the memory and the processors being maxed out.

To resolved till they fix SCOM 2012 R2 APM issues with .NET 2.0, you will need to uninstall from all programs the Microsoft Monitoring and reboot.  Or revert back to SCOM 2012 SP1 agent.

Then all sites are back to normal.  

Tuesday, February 4, 2014

Distributed Cache Powershell commands

From http://technet.microsoft.com/en-us/library/jj219613.aspx
Change the service account running the Distributed Cache
It is recommended to use a SharePoint managed account for this service.
$spfarm = Get-SPFarm
$spcacheService = $spfarm.Services | where {$_.Name -eq “AppFabricCachingService”}
$spaccount = Get-SPManagedAccount -Identity domain\spdistcache$spcacheService.ProcessIdentity.CurrentIdentityType = “SpecificUser”
$spcacheService.ProcessIdentity.ManagedAccount = $spaccount
$spcacheService.ProcessIdentity.Update()
$spcacheService.ProcessIdentity.Deploy()

Graceful stop and deattach local server (No lost cache data)
Stop-SPDistributedCacheServiceInstance -Graceful
Remove-SPDistributedCacheServiceInstance
Deattach local server from a cache cluster (Multiple Distributed Cache servers)
Remove-SPDistributedCacheServiceInstance
Reattach local server to a cache cluster (Multiple Distributed Cache servers)
Add-SPDistributedCacheServiceInstance
Delete the service
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.delete()
Verify in Central Admin, System Settings, Manage Services on Server. It should be gone from this list when it has been completely deleted.
In a multi server farm, you will have to select which server to show the services from in the top-right dropdown.
Create a new service
Add-SPDistributedCacheServiceInstance
Verify in Central Admin, System Settings, Manage Services on Server. It should appear in this list when it has been created. In a multi server farm, you will have to select which server to show the services from in the top-right dropdown.
Start the service on a server
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Provision()
Stop the service on a server
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService” $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()
Check current Cache memory allocation
Use-CacheCluster Get-AFCacheHostConfiguration -ComputerName $env:computername -CachePort “22233″
Change the Cache memory allocation
On all Cache servers in the farm stop the service
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService” $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()
Update the memory allocation
Update-SPDistributedCacheSize -CacheSizeInMB CacheSize
Start the service on all Cache servers
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService” $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Provision()


Remove a host from the cluster: if all else failes
Stop-CacheHost -HostName <servername> -CachePort 22233


Unregister-CacheHost -HostName <servername> -RemoveServicePermissions -ProviderType SPDistributedCacheClusterProvider -ConnectionString 'Data Source=<dbservername>;Initial Catalog=<SharePoint_Config>;Integrated Security=True;Enlist=False'

Wednesday, January 29, 2014

SharePoint 2013 Global navigation: Wrap the menu items

In the master page, there needs to be three things added and one setting modified.  Then you'll have to add to your custom css file (this part is optional but after you see the menu, you'll want to add this).

The items to add to your master file in the SharePoint:AspMenu are:
ItemWrap="true"
RenderingMode="List"
cssClass="mycss-aspmenuclass"

The item to change in the master page setting UseSimpleRendering to false.

this is that it looks like out of the box:

------------------------------------------------------------
<SharePoint:AspMenu
   ID="TopNavigationMenu"
   Runat="server"
   EnableViewState="false"
   DataSourceID="topSiteMap"
   AccessKey="<%$Resources:wss,navigation_accesskey%>"
   UseSimpleRendering="true"
   UseSeparateCss="false"
   Orientation="Horizontal"
   StaticDisplayLevels="2"
   AdjustForShowStartingNode="true"
   MaximumDynamicDisplayLevels="2"
   SkipLinkText="" />
------------------------------------------------------------

this is what it should look like after your changes.
-------------------------------------------------------------
<SharePoint:AspMenu
   ID="TopNavigationMenu"
   Runat="server"
   EnableViewState="false"
   DataSourceID="topSiteMap"
   AccessKey="<%$Resources:wss,navigation_accesskey%>"
   UseSimpleRendering="false"
   UseSeparateCss="false"
   Orientation="Horizontal"
   StaticDisplayLevels="2"
   AdjustForShowStartingNode="true"
   MaximumDynamicDisplayLevels="2"
   SkipLinkText=""
   ItemWrap="true"
   RenderingMode="List"
   cssClass="mycss-aspmenuclass"/>

---------------------------------------------------------------
Now add to your custom css file three items so that there is some space between the menu items.

.mycss-aspmenuclass .level1   
{
 margin-left: 10px;
 margin-right: 20px;
}
.mycss-aspmenuclass .level2
{
 margin-left: 10px;
 margin-right: 20px;
}
.mycss-aspmenuclass .level3
{
 margin-left: 10px;
 margin-right: 20px;
}