Tuesday, December 28, 2010

Emailed HTML Rich Text Column Relative URLs

Scenario
  • You have a list with a multi line text column with Enhanced Rich Text.
  • The item contains links from the current server.
  • You are emailing the contents of that column via SharePoint Designer 2007 Workflows
Issue
  • The hyperlinks in the email do not work.
  • The server name was automatically stripped from the URL, making a relative path.
Resolution
  • Workaround:
    • Add the following note to the field description notifying users of the problem and the workaround.
      • "Use http://TinyUrl.com for hyperlinks and images on this site.  This will prevent emailed relative links."
    • This works because SharePoint only strips URLs it recognizes as local URLs
      • These are usually defined in the Alternate Access Mappings
    • You can use any URL redirector
  • Fixes:
    • Use Visual Studio Workflows and replace the Relative URLs with Absolute URLs
    • Intercept the outbound emails (on the SharePoint or Email servers) and replace
    • Use a custom Workflow Action that prepends the servername into the URLs
    • Use a different field type.  Try different custom Rich Text editor columns.

Monday, December 6, 2010

Help Desk Template Sealed Columns

Scenario
  • You wish to install the MS Fab 40 Help Desk template.
  • You need to change the values in, description of, or delete the Status, Priority, or KBArticle choice or lookup columns/fields.
Issue
  • These columns are Sealed in the list definition. Therefore, you cannot delete or edit them.
    • Note: The Priority column seems to inherit initial values from the standard Priority site collection column
Resolution
  • If you haven't done much with the template, you can unseal the columns in the site definition.  You must do the following on each FEW server.  You must then recreate any ServiceRequest lists.
    • Navigate to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\FEATURES\HelpDeskServiceRequestsList\servicerequest
    • Edit schema.xml
    • Replace all instances of Sealed="TRUE" with Sealed="FALSE"
  • If you have made changes, you can unseal all columns except Priority using SharePoint Manager 2007.  Priority can be hidden from forms and views or may be removed programatically.  Or alternatively, you can change the list definition as above, create a new ServiceRequest list and move the items from the old list to the new.

Tuesday, November 30, 2010

SharePoint 2007, 2010, and 2013 Cascading Lookup Column Comparison

Scenario
  • You have multiple SharePoint lists that are related
    • Parent/Child or other relationship
  • You want to allow the user to define the relationship via a Lookup Column Dropdown (Combobox) or Multiselect Interface
  • Or you need filtered lookups or some other additional lookup functionality
Issue
  • The out of the box SharePoint Lookup Field columns are severely limited
    • They really only work for relatively small lists of uniquely named items that don't change often
    • SharePoint 2010 natively supports related lists, but do not have all the features below
  • We need one or more of these advanced features
    1. Cascading Updates (and possibly deletes)
      • Maintain Referential Integrity
      • Updates made in one list are reflected in the lookups.
    2. Keyboard filtering from the dropdown and multiselect interfaces
      • Autocomplete, find as you type
    3. Cascading drop-down filters
      • One or more dropdowns to filter the final dropdown
      • Ex: State, County, City
    4. Lookup filters (likely based on a List View)
      • Ex: Only show my Cities, or only show Active Items in the lookup
    5. Datasheet view editing (Excel, Access), InfoPath, and Office DIP support
      • In most cases this is unavailable.  The workaround is to create a view without the lookup fields for use with Office integration and ensure the lookup fields are not required or have a default value.
    6. AJAX
      • We don't want to postback when applying realtime filtering
      • We may not want to preload all the values for very large lists
    7. May be used in a Calculated Column
      • Ideally the text field and ID field would both be accessible
    8. Supports multiple display fields from the lookup list
      • ex: First and Last Name concatenation in the dropdown
      • Workaround would be to use a calculated field within the lookup list
    9. Link to add an item to the lookup list from the lookup column interface
    10. Cross site support
      • By default the list must be in the same subsite as the lookup column
    11. Cross site-collection support and content type hub support
      • Workaround would be to synchronize lookup lists accross site collections using a workflow, content deployment job, or a custom timer job.
    12. Two-way relationships
      • Items within a lookup list will keep track of where they have been referenced.
      • Ex: Orders are linked to a customer via the order form.  On the customer form, you can see the linked orders.
      • SharePointBoost's LookupBoost or Sparqube's Lookup Tracker can be installed to provide this information via a separate relationships page.
    13. Matches the SharePoint look and feel
      • Ex: Inherits themes/styles for drop down
    14. Can be created as a site column
      • Sometimes only implemented as a list column.
    15. Conversion tool 
      1. Converts lookup columns to custom lookup
      2. Converts custom lookup back to a regular lookup
    16. Allow filtering from a multiselect
      • Ex: Filter lookup of Cities when multiple States are selected
    17. Set the lookup column's default value
    18. Referential Integrity (2010 new feature)
      • Cascade or disable updates/deletes when the item is used in lookups elsewhere
      • Not available on a multi-select
    19. Projected Columns (2010 new feature)
      • Lists with the lookup column will expose other columns from the lookup list.
      • Ex: Order list with a Customer lookup column could also include Customer Phone and Customer Email in the Order list view based on the selected Customer
Resolution
  • The following third-party products are available to meet your needs.  This analysis was done based on the marketing material available on their websites and any personal experience I have with them.   ? - denotes unknown feature
    • SharePoint 2010 Lookup Column (Out of the box - not third party)
      • Features: 1 (includes recycle bin), 2, 5?, 10, 13, 14, (17 via code), 18, 19
    • Sparqube SharePoint Lookup Column (SharePoint 2010+)
      • Features (provided by vendor): 1, 2, 3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
      • Note: There are 2 column types to choose from.  Each has advantages and disadvantages.  All features above may not be available depending upon which control you use.
      • (12) Sparqube Lookup Tracker provides this as a separate (included) feature
    • KWizCom SharePoint Cascading Lookup Plus
      • Features: 1?, 2, 3, 4, 6, 7, 8, 9, 10, 12*, 14, 15.1, 17?, 18?, 19?
      • Review Notes
        • Runtime issues will occur if you are still referencing AJAX 1.x
        • Single-select, single-value items appear in a grid format with a header
        • Display form grid uses a hyperlink icon rather than text
        • Dropdown skins do not match SharePoint but are customizable
      • *(12) Same list 2-way relationships are not supported
    • SharePointBoost Cascaded Lookup
      • Features: 1, 2, 3, 4, 5 (except multiselect), 8*, 9, 10, 12*, 13, 14, 15, 17*, 18, 19
      • *(12) Lookup Boost: Provides feature 12 via a separate relationship page
      • Review Notes
        • Installed properly
        • Worked as advertised
        • Issue with saving a sub-site as a template after implementing a root level site column and content type.  Workaround provided by SharePointBoost
      • *(8) - Doesn't support hyphenated values in the drop-down for SP 2010.
      •  *(17) - Only supports defaulting to first item in a view and does not support the standard Default property, so this is difficult to set from code.  Does not support defaults on a multi-select.
    • Azu Lookup Plus 2013
      • I haven't evaluated this yet.  Please refer to the website.
    • Infowise
      • Features: 3, 4, 9+, 10, 12 (with bi-directional bundle), 13, 14, 15, 17?, 18?, 19?
      • (9+) Enhanced support for inline simple text additions and for task creation
    • Bamboo Lookup Selector
      • Features: 2, 3, 6, 10, 11, 17?, 18?, 19?
    • SharePointBoost Cross-Site Lookup
      • Features: 2, 10, 15, 17?, 18?, 19?
      • Lookup Boost: Provides feature 12 via a separate relationship page
    • SharePoint Tool Basket
      • Features: 2, 6, 17?, 18?, 19?
      • Open Source
    • SharePoint Cascaded Lookup Dropdowns
      • Features: 3, 6 (client-side only), 17?, 18?, 19?
      • Not a column.  Must be applied to each form.
      • Open Source
    • CodePlex Filtered Lookup
      • Features: 4, 10, 17?, 18?, 19?
      • Open Source

Monday, November 8, 2010

From SmartPart To Visual Web Part Demo and Slides

Here is the solution and slides for my presentation on SharePoint SmartPart and SharePoint 2010 Visual Web Part development.

Slides and Project
NOTE:
I updated the slides to add a section on uploading images to an image library, as in my prior post.  I also updated the custom property section of the slides to reflect the need to implement the custom property in the Web Part class rather than the User Control class.

I also updated the slides to include a quick intro to SharePoint for presenting to a .Net usergroup.

Tuesday, October 19, 2010

Adding Pictures to a Picture Library via a VS2010 Module

Scenario
  • You would like to add some Images to an existing Image Library in your SharePoint site using a Visual Studio 2010 SharePoint Project.
  • You do this by following these steps.
    • Add a module to the project
    • Rename the module to the Image Library name
    • Set the module tag's url and path properties to the Image Library name
      • Leaving spaces in place
      • Ex: <Module Name="Recipe Pics" Path="Recipe Pics" Url="Recipe Pics">
    • Add the images to the module using Visual Studio Solution Explorer's "add existing item" option
    • Add the Type="GhostableInLibrary" tag to the Elements.xml tag for each image
      • Ex: <File Path="FriedOkra.jpg" Url="FriedOkra.jpg" Type="GhostableInLibrary"/>
    • Run the project to deploy the solution
      • This should run without errors
Issue
  • The images are in the Image Library, but the thumbnails on the list view and the item views are missing.  The Item view displays icjpg.gif instead.
  • This issue is also documented on Eugene Rosenfeld's blog.
Resolution
  • Check-out and check-in each image you just added
    • This creates the appropriate thumbnails, but this is a manual process and will be wiped out next time you redeploy the module
    • One option is to add a feature that will check out and in each image.  An alternative is to add the thumbnails directly to the module, although this has 1 issue as outlined below.
  • To add the thumbnails to the module, follow these steps
    • On the Image List's default view page you should see the "t" thumbnails for your images
      • Save each "t" thumbnail to disk in an "_t" subfolder
      • Replace any Html Encoding with the original characters
        • Change %20 to a space 
    • Click on each image's view page and you should see the "w" thumbnail
      • Save each "w" thumbnail to disk in an "_w" subfolder
      • Replace any Html Encoding with the original characters
        • Change %20 to a space
      • Issue: The "_w" images do not work correctly in 2010 with this method.  They are uploaded, but the default item view will not display them.
    • Add _w and _t folders to your module in Visual Studio
    • Add existing items to each module folder from the above subfolders
    • Add the Type="GhostableInLibrary" tag to the Elements.xml tag for each thumbnail image

Monday, July 12, 2010

Download for Search Server Express 2008

Scenario
  • You would like to upgrade WSS 3.0 to Search Server Express 2008 or would like a fresh intall of Search Server 2008 Express. 
Issue
  • Microsoft now redirects most of the download pages to Search Server 2010.
Resolution

Thursday, June 17, 2010

CQWP Expiration Date issue

Scenario
  • You would like to filter your Content Query Web Part by Expiration Date.  You would like items to show up when any of the following are true (OR filter)

    • They are not expired (Expiration is greater than or equal to [Today])
    • Have no expiration date (expiration is null)
Issue
  • There is no Null option in the CQWP Web Part Edit Toolpane, therefore you can only enter the first criteria above.  Therefore, when the Expiration field is left blank (null date), the value is excluded from results.
Resolution
  • One workaround is to use a Data View web part via SharePoint Designer instead of the CQWP.  This will allow you to display a similar format, while adding a null date to the filter.

    • Use the a href="/{@FileDirRef}/DispForm.aspx?ID={@ID}" syntax to include a hyperlink in the title
    • The ... (more) feature will not be included

Thursday, May 20, 2010

Monday, March 22, 2010

Dropbox, LiveMesh, and ZumoDrive! Free cloud storage for the masses.

How did we ever do without cloud storage???

I've been a long time user of GetDropbox and have recently begun using ZumoDrive and Windows LiveMesh/SkyDrive and am very impressed with how useful and easy to use they are.  Before GetDropbox, I was an AOL XDrive user (pre-closure) and prior to that I minimally used Yahoo Briefcase!  Dropbox, LiveMesh, and ZumoDrive are must-haves and are much easier to use than any other free service so far.  MS and Google also offer some document specific services via Office Live SkyDrive and Google Docs storage offerings.  These are more limited regarding synchronization, supported file types, and ease of use.  However, they do offer more free storage and free versions of document editing/viewing applications.

LiveMesh is Microsoft's folder synchronization application that supports syncing to the SkyDrive cloud storage system as well as PC to PC.  It is packaged as part of Windows Live essentials which also includes the extremely useful Windows Live Photo Gallery (facial recognition tagging).  All for Free!
How They Work
  • Each service provides a limited amount of free online storage.  Some offer extra space for referrals (GetDropBox) or for running through the tutorial.  Extra storage is also available for a reasonable monthly fee.
  • The storage is automatically synced directly to a drive or folder on your computer or select smartPhones via a downloadable application which integrates into the OS.
    • Working on files offline will sync once connected
    • No manual intervention required
    • SkyDrive's sync app is called LiveMesh
  • On public terminals or without the application, you can still access the files via their web sites.
  • A few versions of each document are stored by each service to keep track of changes and roll-back accidental saves.
    • Currently, ZumoDrive keeps unlimited versions.
    • LiveMesh does not version.
  • You can share the files with friends or the public as desired (Think FTP).  This is very handy for CraigsList posts, linking to a file instead of attaching it to an email, etc.
The Differences
  • ZumoDrive currently offers larger paid plans but GetDropbox is slightly less expensive for its upgraded plan.  SkyDrive (LiveMesh) offers the most free space
    • Prices and plans will probably even out in the future.
  • GetDropbox adds a folder to your MyDocuments folder, whereas ZumoDrive adds a fixed drive letter
    • ZumoDrive shows how much space is remaining as the disc size.
  • ZumoDrive offers unlimited Versioning, whereas GetDropBox is limited, LiveMesh does not version (SkyDrive can version select doc types, but no integration with LiveMesh)
  • LiveMesh has some exclusive bonuses
    • Internet Explorer favorites/bookmark synchronization
    • Unlimited file/folder synchronization between connected computers/devices
      • This is great for those big videos that are too large for the cloud storage solution
Some other must-have cloud solutions
  • Favorites / Bookmarks
    • Live Mesh Favorites synchronization
    • Google Bookmarks
      • With Toolbar and List integration
  • Image/Photo storage
    • Shutterfly
      • My Preferred since full quality images are retrievable via a Backup DVD purchase and full quality images are saved
    • Too many to list. :)
  • Events and Invitations
    • Facebook
    • Evite
    • Pingg
    • Meetup
    • Sportsvite
  • Social Networking
    • Facebook
    • LinkedIn
    • Google+
  • Online Documents/Collaboration
    • Office Live SkyDrive (Office Web Apps)
    • Google Docs
    • Google Lists
    • Office 365 / BPOS / Microsoft Office Online (Pay Service)
      • SharePoint, Exchange, Communicator/Lync, and Live Meeting
      • When you need collaboration for a small to medium sized office/group
      • Includes Office Web Apps
      • Priced per user with a minimum of 5

Saturday, January 30, 2010

Asp.Net Alternative To SPSecurity.RunWithElevatedPrivileges

 Scenario
  • You would like to run code as the Application Pool user rather than impersonated/delegated logged-in user within a SharePoint Application
  • You would like to run the same code outside of SharePoint in a standard Asp.Net environment or will be developing on a workstation where SharePoint is not installed
Resolution
  • You can use the System.Web.dll's Hosting.HostingEnvironment.Impersonate() method to wrap the elevated code

  • Using (System.Web.Hosting.HostingEnvironment.Impersonate())
         'Elevated Code Here
    End Using

Friday, January 15, 2010

IE Bug: Embedded CSS Styles within AJAX UpdatePanel

Scenario
  • You have a Web UserControl with embedded <style> tags within an UpdatePanel.
Issue
  • Internet Explorer: After an Asynchronous postback some of the Styles are no longer applied.

    • In my case the height property on a div.  This was confusing since the code was expanding/collapsing the div, but the bug was ignoring the style.

  • If you check the source via IE Developer Toolbar you will see that the style is supposed to be applied.
Resolution
  • I was able to resolve this by moving the <style> section to the bottom of the UpdatePanel.

    • I don't know why this works.

  • The best solution is to move the <style> section to the Master Page or Aspx Page <header> section.

    • This is the only approved location for embedded Styles.
    • You can alternatively include a css file.

  • Another alternative is to RegisterClientScriptBlock the style or an external css reference from the UserControl


Sample Code:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <style type="text/css">
            div
            {
                display:block;
                overflow:auto;
            }
            .collapsed 
            {
             height:50px;         
            }
            .expanded
            {
             height:inherit;
            }
        </style>
        <asp:Panel CssClass="collapsed" runat="server" ID="pnlMain">
            1<br />2<br />3<br />4<br />5<br />6<br />
        </asp:Panel>
        <asp:Button ID="btnExpCol" runat="server" Text="Expand" />

    </ContentTemplate>
</asp:UpdatePanel>

Tuesday, December 8, 2009

Bug: Security Trimming using Update Personal Web Parts permission

Scenario
  • You have disallowed Update Personal Web Parts on a site
  • You have enabled Update Personal Web Parts on a page within the site
  • The page uses SPSecurityTrimmedControl with PermissionsString="UpdatePersonalWebParts"
Issue
  • The item does not appear on the page even though they have permissions on the page
  • This is a MS bug due to the SecurityTrimmedControl referring to the Site level permission instead of the Page level permission
Resolution
  • You will need to use another trimming mechanism until MS fixes this bug.

My Links SharePoint list web part mods using HtmlFilter

Goal
  • Modify the standard Links List web part properties using HtmlFilter as follows

    • Remove column header
    • Clear empty group by selector
    • Offer open link in new window option

Solution
  • Add an OpenInNewWindow yes/no column to the Links List
  • Add a Group column to the Links List

    • This can be any type that supports Grouping

  • Add an OpenInNewWindowReplace calculated column to the Links list

    • Calculation:   =OpenInNewWindow&"OpenInNewWindowReplace"

  • Create a view 

    • Group on the Group column
    • Groups should be Expanded
    • Include the OpenInNewWindowReplace calculated column

  • Add the default Links List web part to a page on the site

    • Set the web part view to the newly created view from the previous step
    • Append the following to the Web Part description (under advanced)

      • RemoveColumnHeadersAndBlankGroup


  • Add the following HtmlFilters to the page, masterpage, or to a SmartPart on the page (VB.Net syntax).  For C#, change the "" to \"  and ' to // and don't forget your ;'s
'Remove Blank Grouping from Web Parts with "RemoveColumnHeadersAndBlankGroup" at the end of the Web Part description. Updated to ignore expanded group, due to ajax population resulting in hiding the entire section.
FilterReplaceValues.Add("(?is:(?<first>RemoveColumnHeadersAndBlankGroup""(.(?!class=""ms-gb""))*?titl(?<title>\d+)-1_"")(?<second>(.(?!MSOZoneCell_WebPart))*?Group</a> :&nbsp; <span(.(?!TBODY id=""foot))+?isLoaded=""true""))", "${first} style=""display:none"" ${second}")
'Remove Column Headers from Web Parts with "RemoveColumnHeadersAndBlankGroup" at the end of the Web Part description
FilterReplaceValues.Add("(?is:RemoveColumnHeadersAndBlankGroup(?<first>"".*?<TR class=""ms-viewheadertr""))", "${first} style=""display:none""")

'Links with preceding "TRUEOpenInNewWindowReplace" calculated column values should open in a new window
'Hide the OpenInNewWindowReplace Calculated Column Header
FilterReplaceValues.Add("(?is:<TH (?<first>(.(?!</TH>))*?OpenInNewWindowReplace.*?</TH>))", "<TH style=""display:none"" ${first}")
'TRUE (yes)
FilterReplaceValues.Add("(?is:<TD (?<first>(.(?!</TD>))*?"">TRUEOpenInNewWindowReplace</TD>.*?<A .*?) HREF)", "<TD style=""display:none"" ${first} target=""_blank"" HREF")
'FALSE (no) or nothing (blank)
FilterReplaceValues.Add("(?is:<TD (?<first>(.(?!</TD>))*?"">(FALSE)?OpenInNewWindowReplace</TD>))", "<TD style=""display:none"" ${first}")

Friday, November 20, 2009

HtmlFilter - The ultimate SharePoint and .Net code hack

If you've ever run into a wall of closed classes or inaccessible functionality within asp.net or SharePoint, then I have good news for you. When you can't interface with out of the box server side objects, you can always fall back on the HtmlFilter to save you.

The code I wrote will allow you to intercept whatever HTML the server outputs to the browser and filter it via REGEX expressions returning whatever you would like. It works via the page.response.filter property.

You can add the filter at any point (before pre-render) in your server-side code.  This allows you to selectively apply filters based on server side code and to insert server-side parameters.
Warning: Regular Expressions will increase the server processor load.  Each page request implementng this tool will add some overhead as it searches the html.  You may need to load test your expressions and possibly optimize them.  Note that there is also a property that will bypass the filter on asynchronous page loads, although the performance hit of an asynchronous page load will already be reduced since only the updated html will be filtered.  On the other hand, the overhead on the server will probably be less than the overhead that would be created on the client and via increased content bandwidth if a javascript solution was used.

The HtmlFilter is now available on CodePlex.
Refer to the CodePlex project for future updates and usage examples.

Setup
  • Add the HtmlFilter.vb file to the App_Code\VBCode folder

    • See here for how to configure separate VBCode and CSCode folders using CodeSubdirectories in the web.config

Usage
  • In your UserControl or Page CodeBehind, add the following code in the Page_Load event handler

    • For VB

      Dim FilterReplaceValues As New Specialized.NameValueCollection
      FilterReplaceValues.Add("Your Regex Expression", "Your Replacement Expression")
      HtmlFilter.SetHtmlFilter(Page, FilterReplaceValues, 10000)
      

    • For C#

      Specialized.NameValueCollection FilterReplaceValues = new Specialized.NameValueCollection();
      FilterReplaceValues.Add("Your Regex Expression", "Your Replacement Expression");
      HtmlFilter.SetHtmlFilter(Page, FilterReplaceValues, 10000);


  • The number 10000 in the code above should be at least the length of any replaceable string.

    • This is used in the stream to reduce buffer size.
    • Example:  If you will be replacing strings up to 20 characters, you would put 20 or more there.

  • Fill in the appropriate Regex and Replacement expressions according to your needs.

    • You may add multiple FilterReplaceValues to the collection.  It will parse each one in order.
    • Examples (VB)

      • Remove all UserControl prepended Identifier strings from Form elements, for use in a custom cross-page post scenario.

        "(name|id)=""[^""]*" & Me.ID & "[\$_]", "$1="""

      • SharePoint: Remove the Edit and Export Web Part Edit items from the Edit Menu

        "(?s:<ie:menuitem type=""separator"" /><ie:menuitem title(?!.*separator.*id=""MSOMenu_Edit"").*MSOMenu_Edit.*Export\.\.\.(\r|\n|\s)*</ie:menuitem>)", ""



  • For help creating your own expressions, use some of these tools


SharePoint Backup and Migration Solutions - Third Party Tools

SharePoint Backup, Restore, and Migration are some of the biggest pains with maintaining SharePoint.
Here is a list of tools that have been developed to address some of the issues.  I will fill in details when and if I evaluate them.

Disaster Recovery (these may also support backup/restore migrations)
Migration
Or if you feel lucky, the out of the box stsadm Export and Backup commands can be used.
They should be supplemented with the following

Thursday, November 19, 2009

SharePoint 2007/3.0 Group By AJAX

Scenario
  • Modifying the SharePoint 2007 GroupBy functionality when groups are collapsed by default
  • HtmlFiltering content within one of the groups
  • Using HtmlFilter prior to 11/19/09 release
Issue
  • When expanding a group, the contents are messed up or never display  (loading ... )
  • This is caused by a strange implementation of AJAX on Group By fields within the SharePoint List Web Parts

    • Normally the UpdatePanel syntax is pipe-delimited with

      • length|???|???|content

        • The middle 2 parameters seem to be UpdateType and ID


    • But the SharePoint syntax is

      •  lengthOfEventValidationString|eventvalidationstringcontent||content
      • the second and third pipes || are located together between Icon="icgen.gif and " OType="0" within the table tag
      • ??? Let me know if you can think of any logic for this syntax ???


Resolution
  • Upgrade to the newest HtmlFilter.vb release which will account for the SharePoint Group By syntax

Fiddler was the key to fixing this bug.

Monday, November 16, 2009

Access Denied, Not a Site Collection Admin, and Cannot Create New Items

Scenario
  • You are a Site Collection Admin and Farm Admin for a SharePoint Farm
  • Someone has recently backed up a site collection using Stsadm which includes a site collection lock (SP2 supposedly does this automatically)
Issue
  • Attempt to edit the Site Collection Admins from Site Settings results in the following
    • Error:  You need to be a site collection administrator to set this property
  • Attempt to load a page which does any advanced processing
    • Access Denied
Resolution
  • The Site Collection was Locked (Read-only).  Unlock it via Central Admin (_admin/sitequota.aspx)
    • Set to Not locked

Friday, November 6, 2009

Reorder Page Permission Error

Scenario
  • Created a Links list with item level permissions and User Sorting enabled on a View.
  • Current user has Contribute access to the list with only access to some items (ex: only their own)
Issue
  • The following Error occurs when Clicking the Reorder Menu item

    • You don't have enough permission to access this page. at Microsoft.SharePoint.ApplicationPages.ReorderPage.OnLoad(EventArgs e)
      at System.Web.UI.Control.LoadRecursive()
      at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Resolution
  • You cannot use the out of the box reorder feature when you are using item-level permissions.
    • The user must have edit permissions on every item in the list in order to reorder.
  • Instead, create your own order column and manually configure the sort order in your Views.

Thursday, November 5, 2009

The trial period for this product has expired.

Scenario
  • You installed MOSS 2007 SP2 soon after it was released
Issue
  • You receive the following message

    • Error: The trial period for this product has expired.

Resolution

Loading this assembly would produce a different grant set from other instances

Scenario
  • An assembly (dll) is installed in both the GAC (global assembly cache) and in the App_Bin folder
Issue
  • When browsing to the site you receive the following error:
    • Loading this assembly would produce a different grant set from other instances
Resolution
  • Remove the App_Bin dll


Thursday, October 22, 2009

Back from SharePoint Conference 2009!

Lots of new stuff coming in 2010.  Looks like the best bet is to use the keyword  #SPC09 for all the new stuff.

Good news is that HtmlFilter will be just as useful, if not more-so.

Thursday, October 15, 2009

Thursday, October 8, 2009

Web.Config Custom Configuration sections with RSA

After spending awhile playing with RSA and Custom Configuration Sections I added the following community content:
  • You must compile your ConfigurationSection class as a strongly named assembly (dll) and deploy it to the GAC
    • If you don't, it will try to locate your class in System.Web
  • You should add this to the Compilation\Assemblies section of the Web.config if you will be using the values within a Web Site project (non pre-compiled)
    • Ex: <add assembly="Samples.AspNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=DllPktHere" />
  • The following section declaration should include the full strong named assembly
    • Ex: <section
      name="pageAppearance"
      type="Samples.AspNet.PageAppearanceSection, Samples.AspNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=DllPktHere"
  • Follow the RSA encryption instructions (http://msdn.microsoft.com/en-us/library/ms998283.aspx)
    except for the following:
    • You may need to use the -pef format instead of -pe
    • If you have your section within a group as in the example above, you should use this format: "SectionGroupName/SectionName"
      • This would be instead of the "connectionStrings" section used in the RSA encryption instructions examples.

Thursday, September 24, 2009

Blank UpdatePanel in UserControl

Scenario
  • Editing a UserControl in VS 2008 with html <style> tags in the UserControl
Issue
  • The Designer window is empty as if the updatepanel is invisible (visible=false)
Resolution
  • Place the Style tags at the bottom of the usercontrol, below any UpdatePanels
    • This is a known bug