My blog has moved!

Visit http://blog.adamroderick.com/ and update your bookmarks.

Tuesday, August 18, 2009

Misleading TFS Error Messages and Maximum File Path Length

I was preparing to install TFS 2008 SP1 by merging the installation media from the DVD with the files from SP1, following the steps in the installation guide. While the MSI was extracting (by executing msiexec), I received the error "Error 1309: Error reading from file C:\... Verify that the file exists and that you can access it."



The message indicates that the file cannot be located or that the user running msiexec does not have sufficient permissions on the file. I verified that neither of these were the case.

The actual problem was that the file path was too long. Windows is limited to 260 characters for the full path.

I thought my problems were solved, but after I moved the folders I received a different error: "Error 1308: Source file not found." Click for full view:



I noticed at that point the file it was looking for was not named. Turns out when I copied the files from the DVD to the path that was too long, Windows silently renamed the file to the cryptic name MICR#OPN.DLL (circled in red above). When I renamed that file to the name that msiexec was looking for, boom! second problem solved.

My best guess as to why the error that appeared did so is that TFS truncates the path to the maximum length, then tries to open the incomplete path. I have found others saying TFS displays similar behavior in other situations.

Labels:

Tuesday, August 4, 2009

The Best 70-542 MOSS 2007 Exam Guide

Why is it the best? I could not find a good study guide for this exam, so I made one. I compiled this content before I took the exam, and I passed with flying colors.

Below you will find point-by-point coverage of nearly every topic outlined in the "Skills Measured" section of the official exam page for Microsoft Office SharePoint Server 2007 - Application Development. This is not a cheat sheet, and I encourage you to use these links as starting points as you study each topic.

Please let me know if you see any mistakes or would like to make any additions!


Managing Enterprise Content

Enforce document storage business rules by using Document Policy
Also referred to as “Information Management Policies.” Policies can be defined for content types, lists/libraries, and at the site collection level. SPSite and SPList have an SPAudit property.
Records Management Team Blog
Namespace: Microsoft.Office.RecordsManagement.PolicyFeatures
Classes: Barcode, Expiration, PolicyAudit, PolicyLabel, SPAuditMaskType, SPAudit
Properties: SPList.Audit, SPWeb.Audit, SPSite.Audit


--Create a custom document policy.
Creating a Custom Information Policy by Ton Stegeman


--Deploy a document policy by using a policy feature.
Linking SPContentType with InformationPolicy by Morten Marquard
Policy Feature Overview on MSDN


--Specify logic for a document policy by using a policy resource. Policy Resource Overview on MSDN
Creating a Custom Expiration Formula on MSDN
Class: GlobalCustomSettingsControl


--Manage document retention rules by using the expiration feature policy.
Understanding Record Management - Expiration Policy by Malay Vasavada
Creating a Custom Expiration Formula on MSDN
Methods: Expiration.SetExpirationDateForItem, IExpirationFormula.ComputeExpireDate


--Launch a workflow when a document expires.
Creating Workflows to Transfer Records Upon Expiration on MSDN


Audit Windows SharePoint Services content by using a custom policy
Item-Level Auditing with SharePoint Server 2007 on MSDN
Code Sample: SharePoint 2007 Item-Level Auditing
Classes: SPAuditQuery, SPAuditEntry, SPAuditEntryCollection
Method: SPAudit.DeleteEntries, SPAudit.GetEntries, SPAuditQuery.RestrictTo...


Manage records by using Office SharePoint Server 2007 record management features

Introduction to the Records Center Site on microsoft.com
Set up a Records Center by Niel Wyngaard
Namespace: Microsoft.Office.RecordsManagement.RecordsRepository


--Create a custom file plan.
Creating Custom Routers in SharePoint 2007 on MSDN
Method: RecordSeriesCollection.Add
Interface: IRouter


--Create a custom audit report.
Create a Custom Audit Report on TechNet
Custom Auditing in SharePoint by Ted Pattison
Item-Level Auditing with SharePoint 2007 by Ted Pattison


--Create a custom file submission.
Record Center File Processing on MSDN
Custom Records Center Router on MSDN


--Create a custom legal hold.
Create a Hold to Suspend Records on Microsoft.com
Class: Hold
Method: Hold.SetHold, Hold.ReleaseHold, Hold.IsItemOnHold
Notes: Holds are SPListItems, so you can create a new hold by calling SPList.Items.Add


Create content by using the Office SharePoint Server 2007 Web content management features
Namespace: Microsoft.SharePoint.Publishing
Classes: PublishingWeb, PublishingPage, PublishingPageCollection
Methods: PublishingWeb constructor, PublishingPageCollection.Add


--Extend the Page Authoring toolbar.
Customize Page Editing Toolbar on MSDN


--Create pages dynamically.
Class: PublishingWeb


--Modify page layout by using content placeholders.
Modify the Default SharePoint Content Placeholders on Microsoft.com
Notes: I could not find anything that indicated these are different than typical ASP.NET content placeholders

--Create a custom field control.
Create a Custom Field Control on MSDN
Notes: Override CreateChildControls and check the DisplayMode property to determine if in edit mode. Override PreRender for view mode. Since BaseFieldControl inherits WebControl, you must create a safe control entry in the web.config
Class: BaseFieldControl

--Localize a site by using resource lists.
Localizing a Solution on MSDN

Deploy content between servers
Content Deployment by Tyler Butler
Namespace: Microsoft.SharePoint.Publishing.Administration
Methods: ContentDeploymentPath.GetAllPaths, ContentDeploymentJob.GetAllJobs
SharePoint Content Deployment and Migration API by Stefan Gobner


Provide variations of Web content

--Redirect a user to a variation based on profile settings.
Variations - Taking Locale from User Profile by Sanjeev Nair

--Launch a workflow when an event occurs in a primary variation.


Provision multiple sites in a hierarchy
Define a Portal Site Template on MSDN
Provisioning Portal Sites on MSDN
Notes: In a normal site template, the web template (webtemp*.xml) points to the site template, which defines a site definition, and that is where it stops. In a portal site template, the web template points to the portal site template, which is just a hierarchy pointing back to other web templates (webtemp*.xml). Each of these point to their own site template, or they could possibly point to other portal site templates. This is how you could build a hierarchy of sub sites instead of being limited to a single site.


Creating Business Intelligence Solutions by Using Office SharePoint Server 2007

Display data from a Microsoft Excel workbook by using Excel Services.
Introducing Excel Services on MSDN


Create a trusted workbook location by using the Stsadm.exe command-line tool.
Trust Workbook Locations Using Script on MSDN
Notes: stsadm.exe –o add-ecsfiletrustedlocation –ssp -location -locationtype


Implement business logic by using an Excel Services user-defined function
Excel Services User Defined Functions on MSDN
Developing a Managed-Code UDF on MSDN


--Process enterprise data from a Windows SharePoint Services list
Notes: Since a UDF is just code, you can access SharePoint lists, databases, web services, etc--just as you can in any other code block. I could not find any other information on this item.

--Troubleshoot a user-defined function.
Notes: Since a UDF is just code, you can debug it as you would any other managed code. I could not find any specific information on this item.

Filter data in a workbook by using Excel Services
Connect Filter Web Parts to Excel Web Access on Microsoft.com

Provide parameters to a Report Viewer Web Part from a custom Web Part
Configuring Reporting Services Reports in SharePoint by Ed Richard (see notes on Figures 10 and 11)Using Report Viewer Web Part on a SharePoint Site on MSDN


Expose a data source by adding a data connection to a Report Center Web Site
Working with a Report Center site on Microsoft.com


Create a key performance indicator (KPI) Web Part by using data from a report data source
Create and Publish Key Performance Indicators (KPIs) on Microsoft.com


Integrating Business Data with Office SharePoint Server 2007 by Using the Business Data Catalog (BDC)

Notes. I did not fill in most of the items in this list because honestly, the 8-part series “Everything you need to know about BDC” (currently 7 parts have been published) really does have it all. I combined that with an hour or so of playing with BDC MetaMan. OLEDB data sources and Web services can be used as data sources. Business Data Web Parts and Custom applications use live BDC data. Lists, Search, and User Profile Importer use cached BDC data.

Class: ApplicationRegistry

Everything You Need to Know about BDC by Randy Williams and Wen He (7 parts):



Create a BDC Application Definition
--Create a line of business (LOB) system
Describe an external application in the BDC Application Definition
--Create an LOB system instance.
--Create an entity.
Display data from an external data source
--Create a Finder method.
Enable indexing of data stored in an external data source.
--Create an IDEnumerator.
--Enable searching on a BDC Application Definition.
--Enable a single item query by creating identifiers for entities.
--Enable a single item query by creating a SpecificFinder method.
--Add input and output parameters to a SpecificFinder method.
--Create a filter descriptor.
Create a custom action on an entity.
Create an association between two entities.
Create a Web Part to browse data.
--Return an LOB system instance.
--Return an entity.
--Execute a finder on an entity.
--Execute a method on an entity.
--Execute a SpecificFinder on an entity.
--Execute a wildcard filter on an entity.


Accessing Office SharePoint Server 2007 Application Platform Services

Process InfoPath data from within a workflow


Display an InfoPath Form from within an ASP.NET page by using the Form Services control
XmlFormView control on MSDN


Automate Office Forms Server administration tasks
Class: FormsService, FormTemplate
Code: FormsService fs = LocalFarm.Services.GetValue(FormsService.Name);

--Activate a previously uploaded form template
Programmatically Activating an InfoPath Form Template by Christopher White

Manage credentials by using the single sign-on (SSO) credential store
Configure SSO on MSDN

--Create a custom SSO provider for use by the BDC
Implementing a Pluggable SSO Provider on MSDNInterface: ISsoProvider
Namespace: Microsoft.SharePoint.Portal


--Apply credentials to a Web service call by using SSO
Notes: I could not find anything that specifically applied to this. I assume the question(s) on this topic will refer to GetCredentials, which I have seen a lot of references to
Getting SSO credentials through Code on StackOverflow (nothing actually wrong with the code sample)


Convert documents by using the document converter
Document Converter Services Overview on MSDN

--Convert a document from a document library by using an existing document converter
Document Conversion by Alex Pearce

--Increase the priority of a document in the conversion process
Document Converters on MSDN
Method: SPFile.Convert
Notes: This cannot be done through the user interface. The SPFile.Convert method has a priority parameter


--Transform a custom document format into another format
Document Converter Framework Sample on MSDN


--Publish a page by using the document converter
Page Publishing Using Document Converters on MSDN


Display a user profile retrieved from an Office SharePoint Server 2007 Web service


Searching Data by Using the Search Service

Programmatically enhance the search service

--Access the search context for the Shared Services Provider (SSP)
Method: SearchContext.GetContext


--Associate a search term by creating a Best Bet
Create Keywords and Best Bets by Stefan Gobner


Add a custom search page for searching the BDC

--Extend the user interface by adding a tab to the search page
Add Search Tab by Nicholas Bisciotti


Provide custom search capabilities by creating an enterprise search Web Part
Creating a Custom Enterprise Search Web Part on MSDN
Custom Enterprise Search Web Part Code on MSDN (Begin with the method keywordQueryExecute)


Customize the display of search results by modifying the Search Core Results XSLT
View and Edit the Search Results XSLT Transformation on MSDN

Display results from a Windows SharePoint Services search Web service
Enterprise Search Query Web Service Overview on MSDN


Display the results of a keyword query



Create an audience
Classes: Microsoft.Office.Server.Audience.AudienceManager, Micro
Property: AudienceManager.Audiences
Method: AudienceCollection.Create
Manage Audiences with C# by Nick Stevens


Specify conditions for audience membership by using rules
Manage Audiences with C# by Nick Stevens
Add Complex Rules to an Audience on MSDN

Target a list item to an audience
Method: AudienceManager.IsCurrentUserInAudienceOf


Target a Web Part to an audience by using filters
Using SharePoint 2007 Audiences in Combination with MOSS Publishing Placeholders by Ton Stegeman

Display all audiences to which a user belongs
Method: AudienceManager.GetUserAudienceIDs(“domain\\username”)


Display all users in a given audience
Audience.GetMembership (returns ArrayList)


Customizing Functionality by Using Profiles


Import users into the user profile store from an LDAP store
Importing User Profile Information by Sahil Malik


Create a profile in the user profile store
Create User Profiles in the User Profile Store on MSDN


Manipulate profile properties

--Add a profile property to the user profile store
Creating Custom Profile Properties through Code


--Store a user's attributes in the user profile store by creating a multivalue property
User Profile Properties Overview on MSDN
Code Sample:
Property.IsMultivalued = true;
Property.Separator = MultiValueSeparator.Semicolon //or Comma, or Newline
UserProfile[PropertyName].Add(“value1”)
UserProfile[PropertyName].Add(“value2”)


--Retrieve a specific property from a user profile

--Map a BDC data item to a user profile property
Class: PropertyMapCollection (see the code sample)


--Set the privacy policy for a user profile property
Set Privacy Policies for User Profile Properties on MSDN


Display all colleagues for a given user
Class: ColleagueManager

Add a distribution list to a new membership

Display results from the user profile change log
Get Recent User Profile Changes Using the Change Log on MSDN

Search Commerce Server Orders through Orders Web Service

I could not find a good post anywhere about searching and retrieving the orders via the Commerce Server web services. I created this in Visual Studio 2005 and tested it against Commerce Server 2007. Be sure to change the server name in the app.config file and the search criteria to something that will pull back results from your Commerce Server databases.


Download the Console Application