views:

670

answers:

3

I'm trying to implement the Media Player custom field control described in this MSDN article: http://msdn.microsoft.com/en-us/library/aa981226.aspx

I created a custom site column (of type Link) in a custom content type and followed all the instructions to deploy the solution into SharePoint and add the control to a Page Layout.

However, when I create a page based on a page layout that uses this field control, nothing is displayed in either Edit or View mode of the page.

I dug around in the SharePoint logs, and at the time the page is loaded, I see the following error in ULS:

Control template "MediaPlayerFieldControl" does not exist.

If you've implemented this control, did you have to implement anything other than what the article details? Pretty sure I don't need an ASCX here because the control is handling rendering the media player.

Thank you

+1  A: 

Figured this out ...

I had added the SafeControl entry manually at first to my web.config, and for some reason that didn't work. I'm now including it in manifest.xml like this:

<Assembly DeploymentTarget="GlobalAssemblyCache" Location="MyControlAssembly.dll">
  <SafeControls>
    <SafeControl Assembly="MyControlAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=07085c2a3fb711ee" Namespace="MyControlAssembly" TypeName="*" Safe="True" />
  </SafeControls>
</Assembly>

Not sure what the difference there was, but this did the trick

George Durzi
+1  A: 

SharePoint 2007 doesn't have byte-range requests. Doing a query for a large media file will take the entire blob from SQL and store it on the WFE. I'd be careful about how you implement this.

Kevin Davis
Good call Kevin, we're doing this for small files. Will definitely look into Windows streaming services when there's a requirement to stream larger files
George Durzi
A: 

copy file MediaPlayerFieldControl.ascs to path: " C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES "

related questions