TwitterLinkedInBlog

Sunday, November 27, 2011

iTunes - Remember playback position

iTunes > Right-click song > 'Get Info' > 'Options' tab > Check 'Remember playback position' > OK.

Tuesday, November 22, 2011

Error: Mount-SPContentDatabase - SPUnrecoverableException

Problem:
I received an error when running the following cmdlet:
Mount-SPContentDatabase -Name SampleContentDB -DatabaseServer SampleDBServer -WebApplication http://intranet.samplecompany.com/

Error:
InvalidData: (Microsoft.Share...ContentDatabase:SPCmdletMountContentDatabase) [Mount-SPContentDatabase], SPUnrecoverableException

Resolution:
The drive was full. I cleared some space and then it worked.

Monday, November 21, 2011

XML - Should I Use an Element or an Attribute?

From MSDN...

Elements are used to encapsulate pieces of data, and attributes are generally used to provide accompanying information about an element, rather than to encapsulate raw data itself. Whether you actually use an element or an attribute is up to the needs of your application.

Use attributes if your information requires data of a simple type and:

•Your information requires a default or fixed value.
•Your information requires data that is metadata for an existing element
•If the size of your XML file is an issue, attributes tend to take up fewer bytes than elements

The following list describes the key differences between elements and attributes from a schema perspective:

•A schema can define whether the ordering of elements is significant, but attributes can occur in any order.
•Elements can be nested with the tag, which means one and only one of the listed elements can appear.
•Elements can occur more than once, but attributes cannot.

Source:
http://msdn.microsoft.com/en-us/library/7f0tkwcx(v=vs.71).aspx

Thursday, November 10, 2011

_layouts web.config

Reminder: The following web.config file exists and must be updated for debugging purposes:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config

<configuration>
  <system.web>
    <customerrors mode="Off">
  </system.web>
</configuration>

Using URL Rewrite to Redirect

The following is performed at the web site level in IIS. See 'Resources' below for the 'URL Rewrite' download link, the user reference guide, and a couple other helpful links.
Match URL > Requested URL: 'Matches the Pattern' > Using: 'Regular Expressions' > Pattern:

*Note: Pattern: tests against the <path>, not the entire URL!
http(s)://<host>:<port>/<path>?<querystring>

So if you want to test if a string is in the beggining of the path, you would use ^. For example, if you want to redirect...
http://intranet.samplecompany.com/hr/Pages/default.aspx
... to ...
http://intranet.samplecompany.com/teams/hr/Pages/default.aspx
... you would use:
Pattern: ^hr/.*

Then, Action > Action type: 'Redirect' > Action Properties > Redirect URL:
http://intranet.samplecompany.com/teams/{R:0}
The {R:0} is a back reference variable. You can see it when you use the 'Test pattern...' button in the 'Match URL' section of the form.

*Tip: When using the 'Test pattern...' button > Input data to test:
Use the path, not the entire URL! Remember, the pattern tests against the path, not the entire URL!

*Note: It seems that when using 'Conditions', the path needs a leading forward slash. So for the 'Redirect URL' with no Conditions, one would use the pattern...
^hr/.*
... and the 'Redirect URL'...
http://intranet.samplecompany.com/teams/{R:0}

... but with Conditions, one would use the Condition pattern...
^/hr/.*
... and the 'Redirect URL'...
http://intranet.samplecompany.com/teams{C:0}

*Another Note:
If you attempt to browse to a non-existent page, you will get a 404 error. This is by design, because if the following link doesn't exist here...
http://intranet.samplecompany.com/hr/Pages/sample.aspx

... it's not going to exist here either...
http://intranet.samplecompany.com/teams/hr/Pages/sample.aspx


Resources:

Tuesday, November 8, 2011

CQWP - Date Example

ItemStyle.xsl <xsl:template>

<xsl:value-of select="ddwrt:FormatDateTime(string(@PublicationDate),1033,'MM.dd.yyyy')"></xsl:value-of>

Make sure to include the following in the <xsl:stylesheet> tag:
xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"

Friday, November 4, 2011

Edit in Notepad

  • Open C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML\DOCICON.XML
  • <Mapping Key="txt" Value="ictxt.gif" EditText="Notepad" OpenControl="SharePoint.OpenDocuments"/>
  • Reset IIS
Source: http://sladescross.wordpress.com/2010/04/26/sharepoint-adding-a-custom-document-template/

Thursday, September 29, 2011

.NET - Select a ListItem

sampleDropDownList.ClearSelection();
ListItem sampleListItem = sampleDropDownList.Items.FindByValue(sampleValue);
if (sampleListItem != null)
{
    sampleListItem.Selected = true;
}

SQL Server - Change Result Set Size

Tools > Options... > SQL Server Object Explorer > Commands > Table and View Options > Value for Edit Top <n> Rows command > 300

Friday, September 2, 2011

The trust relationship between this workstation and the primary domain failed

Disconnect network connection > Log in with domain credentials > Reconnect network connection.

Tuesday, July 19, 2011

How to grant the Remote Desktop Users group the "Allow log on through Terminal Services" user right

'Start' > 'Run...' > gpedit.msc > 'Local Computer Policy' > 'Computer Configuration' > 'Windows Settings' > 'Security Settings' > 'Local Policies' > 'User Rights Assignment' > double click 'Allow log on through Terminal Services' > 'Add User or Group...' > Remote Desktop Users > OK > OK

Sunday, July 17, 2011

Windows Server 2008 R2: Enable Sound Over RDP

On the Remote Desktop > Start > Control Panel > Sound > Yes > OK.

On the Remote Desktop > Start > Search programs and files > type 'remote' > click 'Remote Desktop Session Host Configuration' > Connections (Middle Pane) > right-click 'RDP-Tcp' > Properties > 'Client Settings' tab > uncheck 'Audio and video playback' > OK > Start > Log off > Log On > You should hear sound through your client.

References:
How to enable sound over RDP in a Server 2008 R2 Hyper-V guest
Hyper-V Troubleshooting: Enabling Audio Over RDP

Friday, July 15, 2011

I will be speaking at SharePoint Saturday The Conference DC


I will guide you through the obstacles you will encounter as you attempt to put a SharePoint publishing portal up on the Internet. We will mix my recent experiences with audience experiences.

SharePoint 2010 Web Content Management (WCM) Obstacles

Twitter: SPSTCDC

Saturday, May 14, 2011

SP2010 MCM Pre-Reading List


Architecture and Planning

  • Deployment overview (SharePoint Server 2010)
  • Multi Tenancy

  • Evaluation guide for SharePoint Server 2010 (white paper)
  • Farm topology management (SharePoint Server 2010)

  • Fundamental site planning (SharePoint Server 2010) 

  • Logical architecture components (SharePoint Server 2010)
  • Manage farm administration settings (SharePoint Server 2010)

  • Managing privacy (SharePoint Server 2010)
  • Multi-Tenancy in SharePoint 2010 
  • Office Web Apps (Installed on SharePoint 2010 Products)

  • Plan alternate access mappings (Windows SharePoint Services)
  • Plan for collaboration sites (SharePoint Foundation 2010)
  • Plan for server farms and environments (SharePoint Server 2010)

  • Plan for sites and solutions (SharePoint Server 2010)

  • Plan site creation and maintenance (SharePoint Server 2010)

  • Planning and Leveraging SharePoint 2010 Service Applications 
  • Sandboxed solutions planning (SharePoint Foundation 2010) 

  • Server and server farm administration (SharePoint Server 2010) 

  • Service application and service management (SharePoint Server 2010) ONLY focus on BI and Profile services

  • Share service applications across farms (SharePoint Server 2010) 
  • SharePoint Online Overview
  • Site and site collection administration (SharePoint Server 2010) 

  • Site and solution administration (SharePoint Server 2010) 

  • Site and solution governance (SharePoint Server 2010) 

  • Understanding SharePoint 2010 Topology
  • Resource Center - Governance in SharePoint Server 2010  
    • Business Connectivity Services
      Business Continuity Management
      Business Intelligence
      Capacity Management
      Enterprise Application Development
      Enterprise Content Management
      Enterprise Search
      Forms
      Monitoring & Operations
      Performance Testing & Tuning
      Profiles/Social
      Security
      Storage Planning & Maintenance
      Upgrades
      Web Content Management
      Workflow
      Source: http://www.dynamicevents.com/upload/MCM-MCA/MCM/SharePoint/MCMSharePointPre-Reads.pdf