Previous Next

Thread: Web Playlist provider Sample

Last post 04-25-2008 4:39 PM by Brian_Blum. 12 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (13 items)

Sort Posts:

  • 04-22-2008, 5:48 PM

    Web Playlist provider Sample

    I'm having problems getting the WebPlaylist Provider Sample to work.   I have compiled the provider sample.  I have registered the sample as SamplePlaylistProvider.ProvderSample using regasm.   I have added the custom provider to extention wpl in iis webplaylists/playlist providers and set it to use File based and 64 (as I used regasm x64).  I have also placed advertisement.wmv in the directory. 

     

    MediaDirectory = @"H:\Projects\webPlaylist\";
    Advertisement = "advertisement.wmv";

    My request url:
    http://localhost:80/request/tutorial.wpl

    Should give me advertisement.wmv wrapped around <MEDIAFILE> correct? 

    Here is my iis errors

    Module IIS Web Core
    Notification MapRequestHandler
    Handler PlaylistHandler-SamplePlaylistProvider.ProvderSample-wpl
    Error Code 0x80070002

    Requested URL http://localhost:80/request/tutorial.wpl
    Physical Path H:\Projects\webPlaylist\tutorial.wpl
    Logon Method Anonymous
    Logon User Anonymous

    What am I doing wrong :)?

    ** I have also tried with out file based and I get a 500 error

    Module PlaylistHandler
    Notification ExecuteRequestHandler
    Handler PlaylistHandler-SamplePlaylistProvider.ProvderSample-wpl
    Error Code 0x80070002

    Requested URL http://localhost:80/request/tutorial.wpl
    Physical Path H:\Projects\webPlaylist\tutorial.wpl
    Logon Method Anonymous
    Logon User Anonymous
  • 04-22-2008, 8:19 PM In reply to

    • vsood
    • Top 75 Contributor
    • Joined on 07-12-2007, 1:16 AM
    • Redmond
    • Posts 50

    Re: Web Playlist provider Sample

    This should work. Did you register the provider using the UI? Could you send us the config entry?

    Also, in this case the provider is not a file based provider as it does not have a physical playlist file associated. That may be the problem

  • 04-22-2008, 8:20 PM In reply to

    • prakashd
    • Top 500 Contributor
    • Joined on 10-16-2007, 7:33 PM
    • Redmond
    • Posts 10

    Re: Web Playlist provider Sample

    You should not register the provider for file based handler because then IIS expects that a tutorial.wpl physical file is present.

     As to the 500 error ... Can you ensure that your provider is registered correctly and can be launched. Try running the following VB script ...

     set provider = CreateObject("SamplePalylistProvider.ProviderSample")

    and see that succeeds (which means your managed provider is registered fine as a COM component).

    If that is working fine then probably some error in the provider which should be easy to debug by attaching the debugger to your code.

  • 04-22-2008, 8:36 PM In reply to

    • prakashd
    • Top 500 Contributor
    • Joined on 10-16-2007, 7:33 PM
    • Redmond
    • Posts 10

    Re: Web Playlist provider Sample

    I think I know the error (fingers crossed :-) )  The program id of the sample provider in the code is "SamplePlaylistProvider.ProvderSample" . There is a typo with missing 'i'

     Make sure when you register your provider in the IIS manager you give the exact same name or even better correct the name and register the DLL again :)

  • 04-22-2008, 11:49 PM In reply to

    Re: Web Playlist provider Sample

    Yep Used the UI to register the provider in iis.  
    Config Entry:

     <add name="PlaylistHandler-SamplePlaylistProvider.ProviderSample-wpl" path="*.wpl" verb="GET,HEAD" type="" modules="PlaylistHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Read" allowPathInfo="false" preCondition="bitness64" responseBufferLimit="4194304" />

    Regasm output :

    C:\Windows\Microsoft.NET\Framework64\v2.0.50727>regasm C:\Users\Jason\Desktop\pr
    ovidersample\providersample\managed\bin\Release\providersample.dll
    Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.1434
    Copyright (C) Microsoft Corporation 1998-2004.  All rights reserved.

    Types registered successfully

    VBScript output:

    H:\Projects\webPlaylist>cscript check.vbs
    Microsoft (R) Windows Script Host Version 5.7
    Copyright (C) Microsoft Corporation. All rights reserved.

    H:\Projects\webPlaylist\check.vbs(1, 1) (null): The system cannot find the file
    specified.

  • 04-22-2008, 11:50 PM In reply to

    Re: Web Playlist provider Sample

    Ok I renamed the [ProgId("SamplePlaylistProvider.ProviderSample")] to correctly ad the i.

    Cleaned & Built. Then re-registered the dll (I don't need to unregister first do I?)

    C:\Windows\Microsoft.NET\Framework64\v2.0.50727>regasm C:\Users\Winston1000\Desktop\providersample\providersample\managed\bin\Release\providersample.dll

     Then

     ProviderName : Wrapper Playlist
     Description : Ad Wrapper Playlist
     Program Id: SamplePlaylistProvider.ProviderSample
     File Extention: wpl (notice no dot)
     Bitness: 64 bit (Because I used the Framework64 regasm)

    Then access http://localhost/request/tutorial.wpl w/ Error below

    Module PlaylistHandler
    Notification ExecuteRequestHandler
    Handler PlaylistHandler-SamplePlaylistProvider.ProviderSample-wpl
    Error Code 0x80070002


    Requested URL http://localhost:80/request/tutorial.wpl
    Physical Path H:\Projects\webPlaylist\tutorial.wpl
    Logon Method Anonymous
    Logon User Anonymous

     

  • 04-23-2008, 12:04 AM In reply to

    Re: Web Playlist provider Sample

    OK used /codebase and it did a bit more...now it gives me a 404 webpage but the error is a 404 error now w/ error Code 0x0000000 and the right handler...seems better?

    Module PlaylistHandler
    Notification ExecuteRequestHandler
    Handler PlaylistHandler-SamplePlaylistProvider.ProviderSample-wpl
    Error Code 0x00000000

    Requested URL http://localhost:80/request/tutorial.wpl
    Physical Path H:\Projects\webPlaylist\tutorial.wpl
    Logon Method Anonymous
    Logon User Anonymous

     

  • 04-23-2008, 11:32 AM In reply to

    • vsood
    • Top 75 Contributor
    • Joined on 07-12-2007, 1:16 AM
    • Redmond
    • Posts 50

    Re: Web Playlist provider Sample

    Great, you are just one step away.

    1. Go to Playlist UI main page
    2. Click on Edit Feature Settings
    3. Check the "allow absolute URLs" check box

    This should fix the 404 error. This is a security feature for shared hosters.

  • 04-23-2008, 6:51 PM In reply to

    Re: Web Playlist provider Sample

    Ok now I'm getting:  I think I saw the 0x80070002 error when I had a 500 too.  Maybe you can upload a working version to skydrive for testing and compaison.  I've found a few errors in your post...probably not an issue but.. is it playlistprovder.dll or playlistprov(i)der.  Also as mentioned before   SamplePlaylistProvider.Prov(i)derSample.  Thanks for all your hard work...just hope we can test soon.  Please include everything if you do make a vanilla install working version and I'm sure we'll figure it out.

     

    IIS Web Core
    Notification MapRequestHandler
    Handler PlaylistHandler-SamplePlaylistProvider.ProviderSample-wpl
    Error Code 0x80070002

    Requested URL http://localhost:80/request/tutorial.wpl
    Physical Path H:\Projects\webPlaylist\tutorial.wpl
    Logon Method Anonymous
    Logon User Anonymous
  • 04-23-2008, 7:37 PM In reply to

    • vsood
    • Top 75 Contributor
    • Joined on 07-12-2007, 1:16 AM
    • Redmond
    • Posts 50

    Re: Web Playlist provider Sample

    Hi

    We have a working version. Prakash will upload that to his blog and and send out the link here in a short while. He will also include a batch script to make config changes.

    Thanks for working on this.

  • 04-23-2008, 7:43 PM In reply to

    • prakashd
    • Top 500 Contributor
    • Joined on 10-16-2007, 7:33 PM
    • Redmond
    • Posts 10

    Re: Web Playlist provider Sample

    See my blog entry at http://blogs.iis.net/prakashd/archive/2008/04/21/writing-custom-playlist-providers.aspx The attached zip file has the code , visual studio solution and a batch file to register the module.  Can you take a look and see if you are missing something?

  • 04-23-2008, 10:45 PM In reply to

    Re: Web Playlist provider Sample

    Well I will look for your new uploads...thanks again for your help.   I'm sure its just user error on my part.   Maybe some other users have had better luck?

  • 04-25-2008, 4:39 PM In reply to

    Re: Web Playlist provider Sample

    One other thing to note about the sample provider is that it wraps the requested content in a playlist that serves an ad first.  Make sure that you have the content correctly named and placed in the media directory.  If you're requesting tutorial.wpl, make sure you've got tutorial.WMV in the media directory.  You should be able to request both that file and advertisement.wmv directly to confirm that the files are accessible.

Page 1 of 1 (13 items)
Page view counter