Multi-Server PKS Install (Part 2)


There is no Part 2!

Most of the issues that happened with farm installs have been fixed in the most recent versions.

In fact, I would suggest using August PKS (the newest version as of my writing this) if you are creating a new PKS site.

I'll warn you though, the install is longer than it has ever been. Follow the document and double check every step... seriously.

author: Jeremy Campbell | posted @ Tuesday, December 15, 2009 6:50 PM | Feedback (0)

Multi-server PKS Install (Part 1)


The Podcasting Kit for SharePoint (PKS) was originally designed to work in a single server MOSS environment. Way back when we here at 3Sharp were writing the original Tech Preview versions, we decided to keep it simple while we were developing the original features. This made testing on our own local VMs much easier. Besides, it was a tech preview. No need to worry about high availability production environments yet.

Now, with the later Beta releases more people are wanting to install PKS on sharepoint farms, like normally used in a production SharePoint environment. This still isn't currently supported by PKS, but it is possible if you are willing to get your hands dirty.

So, in this "Part 1" post, I'm going to give some tips on how to get through the first part of the deployment of the December Beta. Note: this will not be enough to get everything working, but you will be able to at least see the home page without getting errors.

First things first, get SharePoint up and running with a regular "collaboration portal" on your farm.

Next, follow the setup instructions up through the "Welcome Page" section. When you go to the home page now, you will probably see a message Unknown server tag 'asp:ScriptManager'. This is because the installer was not able to properly set up the web.config file during the install, and the keys needed for ASP.NET AJAX are missing. [The AJAX framework is used by Silverlight]

Luckily, having been the developer who originally developed the Silverlight controls, I still had a copy of the required changes laying around... and here they are:

1. Add to the <configSections> element:
  <configSections>   
   <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
     <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
     <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
      <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
      <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
      <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
     </sectionGroup>
    </sectionGroup>
   </sectionGroup>
  </configSections> 
  
  2. Add a safe control entry for System.Web.UI from the Microsoft AJAX Extensions within the <SharePoint><SafeControls> element:
  <SafeControls>
   <SafeControl Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*" Safe="True" />
  </SafeControls>
  
  3. Add these new registrations at the end of the <httpHandlers> element:
  <httpHandlers>
    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
  </httpHandlers>
  
  4. At the end of the <httpModules> section, add a new registration:
  <httpModules>
    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </httpModules>
  
  5. In <compilation><assemblies> add:
  <assemblies>
    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </assemblies>
  
  6. In <system.web><pages…> add:
  <pages enableSessionState="false"…>
    <controls>
   <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </controls>
  </pages>
  
  7. Add the following at the bottom of the Web.config, before the </configuration> tag:
  <system.web.extensions>
   <scripting>
     <webServices>
     <!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
     <!--
    <authenticationService enabled="true" requireSSL = "true|false"/>
     -->
     <!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and writeAccessProperties attributes. -->
     <!--
     <profileService enabled="true"
         readAccessProperties="propertyname1,propertyname2"
         writeAccessProperties="propertyname1,propertyname2" />
     -->
     </webServices>
     <!--
     <scriptResourceHandler enableCompression="true" enableCaching="true" />
     -->
   </scripting>
  </system.web.extensions>
  <system.webServer>
   <validation validateIntegratedModeConfiguration="false"/>
   <modules>
     <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
   </modules>
   <handlers>
     <remove name="WebServiceHandlerFactory-Integrated" />
     <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
       type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
     <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
     <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
   </handlers>
  </system.webServer>
  
  8. Save the Web.config file.

Whew. Don't copy these changes to your other front-end servers just yet - there are more. If you point your browser to the first server you've updated, you'll now see an error message about the site map provider SPLeftNavigationProvider. Luckily, I was the author of this compentent also! There are two more nodes you'll need to add to the web.config file.

Under <siteMap><providers> add the following keys:

     <add name="SpLeftNavigationProvider" type="PKS.Sharepoint.Navigation.SpLeftNavigationProvider, PKS.Sharepoint.Navigation, Version=1.5.0.0, Culture=neutral, PublicKeyToken=3a737f14c332a521" siteMapList="PKS Left Navigation Items" isMobileView="false" />
    <add name="PKSNavigationProviderMobile" type="PKS.Sharepoint.Navigation.SpLeftNavigationProvider, PKS.Sharepoint.Navigation, Version=1.5.0.0, Culture=neutral, PublicKeyToken=3a737f14c332a521" siteMapList="PKS Left Navigation Items" isMobileView="true" />

Now you can save the web.config and copy it out to the other front-end servers you may have.

All of this should get you through the first part of the installation. If you are using a network share to host your Podcast Files library for the External File store - there is another slew of problems you're about to run into...

author: Jeremy Campbell | posted @ Thursday, February 12, 2009 5:54 PM | Feedback (2)

SharePoint killed my Web Part (and a little of me died too)


You can't really call it a bug. It appears to be doing what it is supposed to be doing. But it stil totally sucks.

The Problem:

We are working on a Podcasting Kit for SharePoint solution in our development environment. At some point as we are making changes to the pages, we check a page in and all of the Web Parts dissapear. They are gone forever... never to be seen again. They've taken their last trip down the inter-tubes, their bits scattered in the wind.

The Other Problem:

Some times when we open a page in SharePoint Designer it tells us that it cannot find the Master Page. The only problem is, the Master Page is right where it should be. At this point, any editing of the page has to be done all in the code view. Have you ever written out a Data View Web Part by hand? Its not easy, because SharePoint won't tell you where you've messed up, just that it doesn't work.

Why it is all my fault:

Turns out that while I was able to make all our changes easily, I probably messed everything up. It all started when I checked out the Master Page that is installed with PKS and made some changes to it. This caused it to be changed from the Site Definition. It even had a nice little blue icon next to it with an "i" in it. I though this was to remind you that it had been customized... turns out it is a warning of impending doom!

Once the Master Page was customized, some of the Pages got confused about which version to look at. Since they couldn't figure out what to do, they never loaded the correct Layout Page. Here is where it all ties together... when a page loads, if there is a Web Part that is defined in a specific zone and that zone isn't present - SharePoint deletes the Web Part. I'm sure this saves all sorts of bad things from happening. And of course, the page at least still loads instead of giving off an error message. But the Web Parts are gone forever. You can't restore them. All you can do is add new ones to the page and set them up again.

I seriously think this has taken a year off my life. I need those years! I already smoke!

author: Jeremy Campbell | posted @ Tuesday, December 02, 2008 3:11 PM | Feedback (0)