Another Reminder – SharePoint is COPY BY VALUE

I'm doing a lot of code gen in SharePoint and something that was driving me crazy was auto gen of content types, list templates, and lists from a database.  The List instance would use the list template which would in turn use a ContentTypeRef.  Everything worked fine, exept when I go to enter a new item…no columns!  Doh!  Hate the Copy By Value default of SharePoint…a nice reminder blog post is here:

 http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/01/28/how-to-adding-a-content-type-to-a-list-the-correct-way.aspx

Chris

Migrating Hyper-V back to VPC! – Hal.dll

If you follow my posts, you'll know I didn't exactly follow the migration steps from VPC to Hyper-V.  So, I needed to get back to VPC to make some changes and then redeploy to Hyper-V.  Unfortunately I had already installed the "intergration services" of hyper-v which updates the HAL!  So, what to do?

Simply fire up an existing VPC after attaching the one you need to update the HAL as a secondary drive.  Assign it a drive letter, replace c:windowssystem32hal.dll with one that matches the OS (server 2003, 2008) and processor architecture (32 vs 64bit).

Fire up your VPC…it should load now!  (NOTE:  if it does not load, boot in Safe Mode, uninstall Integration services, your HAL will be replaced with the original).  SWEET!  Make your changes (uninstall Integration services, reboot, install VM additions, uninstall VM Additions), deploy to Hyper-V, re-install Integration Services.

If when you move over to Hyper-V you still get the  "Virtual machines exists" error, you have to delete some of the VPC services that don't get uninstalled!  Use the "sc delete <servicename>" command from the command prompt to delete them!

The only draw back is that you will have to re-activate your image after updating the HAL.

Chris

SharePoint Metadata Security – Titus Labs

I was recently looking for a column/field level permission tool, but have not found one (tried building one, but wow, super complex to do!).  In my search I found a tool by Titus Labs out of Canada (http://www.titus-labs.com/). 

It will dynamically set permissions based on a set of rules.  These rules can be built based on the column values for a list.  They have implemented it as part of Information Management Policy (IMP), a great approach!  You can build your own IMP by referencing our course "Programming Microsoft Office SharePoint Server – 50146"

The tools is very easy to use with an install batch file that simply takes the url of where the features need to be installed.  It is installed as a solution so all your web fronts ends will end up with the features installed.  It is very easy to use and has some nice error checking in it.  Check it out and email Charlie at Titus at Charlie.Pulfer@titus-labs.com for a trial.

They built the addin with extensibility in mind. You can add permissions sets that are reusable as well as arrange the rules you want to be applied in a particular order.  Nice product, super simple design, easy install!

Chris

SharePoint Hierarchical Object Store – what’s in it?

The configuration database is actually pretty simple in design, but the data inside of it is not so simple.  I have run across the "objects" table a few times in the past few years, but never really looked deep into it.  Here is a list of objects that are in the table.  Notice some of the more interesting ones like SPAlertTemplate.  Other blogs about this table:

http://jritmeijer.spaces.live.com/blog/cns!8A48A27460FB898A!1176.entry
http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=271

Microsoft.Office.Excel.Server.ExcelServerSharedWebService
Microsoft.Office.Excel.Server.ExcelServerSharedWebServiceInstance
Microsoft.Office.InfoPath.Server.Administration.ExemptUserAgent
Microsoft.Office.InfoPath.Server.Administration.FormsService
Microsoft.Office.InfoPath.Server.Administration.FormTemplate
Microsoft.Office.InfoPath.Server.Administration.PersistedString
Microsoft.Office.RecordsManagement.Internal.ExpirationJobDefinition
Microsoft.Office.RecordsManagement.Internal.HoldReportJobDefinition
Microsoft.Office.RecordsManagement.Internal.PolicyConfigService
Microsoft.Office.RecordsManagement.Internal.PolicyConfigServiceInstance
Microsoft.Office.RecordsManagement.Internal.PolicyUpdatesJobDefinition
Microsoft.Office.RecordsManagement.Internal.RecordsRepositoryJobDefinition
Microsoft.Office.RecordsManagement.SearchAndProcess.SearchAndProcessWIJD
Microsoft.Office.Server.Administration.AnalyticsService
Microsoft.Office.Server.Administration.AnalyticsServiceInstance
Microsoft.Office.Server.Administration.ApplicationRegistryService
Microsoft.Office.Server.Administration.ApplicationRegistryServiceInstance
Microsoft.Office.Server.Administration.ApplicationServerAdministrationServiceJob
Microsoft.Office.Server.Administration.ApplicationServerJob
Microsoft.Office.Server.Administration.ConfigurationCheckerJob
Microsoft.Office.Server.Administration.DiagnosticsService
Microsoft.Office.Server.Administration.JobSchedulerService
Microsoft.Office.Server.Administration.JobSchedulerServiceInstance
Microsoft.Office.Server.Administration.LicensingJob
Microsoft.Office.Server.Administration.OfficeServerService
Microsoft.Office.Server.Administration.OfficeServerServiceInstance
Microsoft.Office.Server.Administration.OSSVssDiscoveryHelper
Microsoft.Office.Server.Administration.SessionStateService
Microsoft.Office.Server.Administration.SessionStateServiceInstance
Microsoft.Office.Server.Administration.UserProfileService
Microsoft.Office.Server.Conversions.LauncherService
Microsoft.Office.Server.Conversions.LauncherServiceInstance
Microsoft.Office.Server.Conversions.LoadBalancerService
Microsoft.Office.Server.Conversions.LoadBalancerServiceInstance
Microsoft.Office.Server.Diagnostics.StaticSqmDataCollectionJob
Microsoft.Office.Server.Search.Administration.ChildFarmContentSourcesJobDefinition
Microsoft.Office.Server.Search.Administration.IndexingScheduleJobDefinition
Microsoft.Office.Server.Search.Administration.SearchAdminSharedWebService
Microsoft.Office.Server.Search.Administration.SearchAdminSharedWebServiceInstance
Microsoft.Office.Server.Search.Administration.SearchDataAccessServiceInstance
Microsoft.Office.Server.Search.Administration.SearchService
Microsoft.Office.Server.Search.Administration.SearchServiceInstance
Microsoft.Office.Server.UserProfiles.MySiteCleanupJob
Microsoft.Office.Server.UserProfiles.WSSSynchScheduler
Microsoft.Office.Workflow.BulkWorkflowWIJD
Microsoft.SharePoint.Administration.SPAdministrationService
Microsoft.SharePoint.Administration.SPAdministrationServiceInstance
Microsoft.SharePoint.Administration.SPAdministrationWebApplication
Microsoft.SharePoint.Administration.SPAlternateUrlCollection
Microsoft.SharePoint.Administration.SPApplicationPool
Microsoft.SharePoint.Administration.SPChangeLogJobDefinition
Microsoft.SharePoint.Administration.SPConfigurationDatabase
Microsoft.SharePoint.Administration.SPConfigurationRefreshJobDefinition
Microsoft.SharePoint.Administration.SPContentDatabase
Microsoft.SharePoint.Administration.SPDatabaseService
Microsoft.SharePoint.Administration.SPDatabaseServiceInstance
Microsoft.SharePoint.Administration.SPDatabaseStatisticsJobDefinition
Microsoft.SharePoint.Administration.SPDeadSiteDeleteJobDefinition
Microsoft.SharePoint.Administration.SPDiagnosticsService
Microsoft.SharePoint.Administration.SPDiskQuotaWarningJobDefinition
Microsoft.SharePoint.Administration.SPDocumentConverter
Microsoft.SharePoint.Administration.SPEncryptedString
Microsoft.SharePoint.Administration.SPFarm
Microsoft.SharePoint.Administration.SPFeatureDefinition
Microsoft.SharePoint.Administration.SPImmediateAlertsJobDefinition
Microsoft.SharePoint.Administration.SPIncomingEmailService
Microsoft.SharePoint.Administration.SPIncomingEmailServiceInstance
Microsoft.SharePoint.Administration.SPOutboundMailService
Microsoft.SharePoint.Administration.SPOutboundMailServiceInstance
Microsoft.SharePoint.Administration.SPPersistedFile
Microsoft.SharePoint.Administration.SPProcessIdentity
Microsoft.SharePoint.Administration.SPRecycleBinCleanupJobDefinition
Microsoft.SharePoint.Administration.SPServer
Microsoft.SharePoint.Administration.SPSolution
Microsoft.SharePoint.Administration.SPSolutionLanguagePack
Microsoft.SharePoint.Administration.SPSolutionLanguagePack+DeploymentConfig
Microsoft.SharePoint.Administration.SPSolutionLanguagePack+SolutionOperationStatus
Microsoft.SharePoint.Administration.SPSqmTimerJobDefinition
Microsoft.SharePoint.Administration.SPTimerService
Microsoft.SharePoint.Administration.SPTimerServiceInstance
Microsoft.SharePoint.Administration.SPUsageAnalysisJobDefinition
Microsoft.SharePoint.Administration.SPUsageSettings
Microsoft.SharePoint.Administration.SPWebApplication
Microsoft.SharePoint.Administration.SPWebConfigFileChanges
Microsoft.SharePoint.Administration.SPWebService
Microsoft.SharePoint.Administration.SPWebServiceInstance
Microsoft.SharePoint.Administration.SPWorkflowAutoCleanJobDefinition
Microsoft.SharePoint.Administration.SPWorkflowFailOverJobDefinition
Microsoft.SharePoint.Administration.SPWorkflowJobDefinition
Microsoft.SharePoint.Portal.Administration.PortalService
Microsoft.SharePoint.Portal.Administration.PortalServiceInstance
Microsoft.SharePoint.Portal.Administration.SkuTypeSyncJob
Microsoft.SharePoint.Portal.Administration.SsoService
Microsoft.SharePoint.Portal.Administration.SsoServiceInstance
Microsoft.SharePoint.Portal.Analytics.LogImportJobDefinition
Microsoft.SharePoint.Portal.Analytics.UsageProcessingJobDefinition
Microsoft.SharePoint.Search.Administration.SPSearchDataAccessServiceInstance
Microsoft.SharePoint.Search.Administration.SPSearchDatabase
Microsoft.SharePoint.Search.Administration.SPSearchJobDefinition
Microsoft.SharePoint.Search.Administration.SPSearchService
Microsoft.SharePoint.Search.Administration.SPSearchServiceInstance
Microsoft.SharePoint.SPAdminFeature
Microsoft.SharePoint.SPAlertTemplate
Microsoft.SharePoint.Upgrade.SPManager

Chris

How to Recreate your Central Administration Web

I'm sure a lot of you have done this one before:

Moved all sharepoint databases from one db server to another, probably in the process of upgrading from SQL 2005 to SQL 2008 right?  Then you realize that you have now lost your central administration site and really have no idea how to get it back so you can change the location of the databases?  Yeah…I did it this weekend too.

Luckily, you can run the following command to get your central administraiton site service running on a web front end:

stsadm.exe -o provisionservice -action start -servicetype
Microsoft.SharePoint.Administration.SPWebService -servicename
WSS_Administration

Another way of doing it is to remove the web server from the farm, then add it back, selecting the advanced option to make it host the CA web application

This made me very happy that I didn't not have to recreate my Farm simply for the lack of a front end web to change things!

Deleting Long File Paths

I was installing MacOS Leopard a few weeks ago and ended up unzipping the HFS file system DVD to my desktop.  It created a file path the likes I have never seen!  In order to get rid of it I couldn't simply click the "delete" button without getting an error about the file path.  reminded me of the times of FTP tagging!  I fould this nice articule to delete long file paths:

 http://support.microsoft.com/kb/320081

Hope this helps some of you!

Calculating distance between two Points – GPS

It's a crazy long algorithm, but it works…in C#:  A and B are point classes.

Math.Cos(Math.Sin((A.Latitude * Math.PI / 180)) * Math.Sin((B.Latitude * Math.PI / 180)) + Math.Cos((A.Latitude * Math.PI / 180)) * Math.Cos((B.Latitude * Math.PI / 180)) * Math.Cos(((A.Longitude – B.Longitude) * Math.PI / 180)))) * 180 / Math.PI) * 60 * 1.1515)

I use it in my platform when determining closest user and if a person is at an event.

Chris

MCT Virtual Summit Presentation and SharePoint Sales Guide

I did my Virtual Summit last night…was perfectly timed to the second!  I have attached the powerpoints and sales guide from the presentation.

I basically talk about the various different courses that you can take around SharePoint and what is offered in the MS Courseware Library… a lot of the ACS courses are on the top of the lists.

Enjoy!
Chris

SharePoint 2007 Governance Course

Governance seems to come up in spurts around the community.  This course has been around for a while and really drives a lot of the issues with implementing SharePoint 2007 and addresses issues that you will run into 2 years down the road with your SharePoint 2007 install.

Not a course for Developers or End Users, it is targeted at IT Manager and CIO/CTO level individuals.

The outline is available here (and attached to this blog as a word document):

http://www.architectingconnectedsystems.com/course.aspx?courseid=30

If you want to purchase a copy, send me an email and mention my blog and I'll take $25 off!  First 5 people to email get it for FREE!
Chris