Tuesday, February 28, 2012

SharePoint 2010 : Get rid of %20 in List Names

Often in my projects I hit the 250 character limit in the URL because of a number of %20 which is the  URL encoding for a space.

One way is to convince my practioners that using an "_" or Camel Casing is the way to go. 

The other common trick that I employ is to Create my List, View, Library with no spaces so then my URL has no %20 and then go and rename the List,View, Library etc. Since the URL doesn't change on renaming I got my URL with lesser characters and my name the way the Business wants it .

Bingo!!

Sunday, February 12, 2012

SharePoint 2010 - Save Site as Template error

I was trying to save my site as Template from the Site Settings page and got an unauthorized exception with a co relation id.
I went to the SharePoint  logs
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
and found the following error on click of save site as template-
w3wp.exe (0x1A14)                           0x0998    SharePoint Foundation             General                           9fjl    Monitorable    SPSolutionExporter: System.UnauthorizedAccessException: Access to the path 'C:\Temp\SPSolutionExporter-5745c17f-255e-465e-81c9-aecb1fbce9b9\Test1ListInstances\Files\FormServerTemplates\Schema.xml' is denied.     at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)     at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)     at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)     at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 buffe...    9987739f-cb79-459e-b92a-24342b6591aa


I found a solution on technet and granted the app pool account my web app was running under access to C:\Temp folder. And it worked like a charm!

Cheero!