« Previous Next »

Thread: Issues with the sample provided

Last post 04-23-2008 7:38 PM by vsood. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 04-22-2008, 8:32 PM

    • rakkimk
    • Not Ranked
    • Joined on 07-02-2006, 5:56 PM
    • Posts 4

    Issues with the sample provided

    When you register a register a provider, what is that “ProgramID”? COM GUID? I’m just using that sample which was provided in the site and it has the below: [Guid("D5178953-96A0-4ebd-B511-024897DA2C09")] I just used the same Guid there while creating a new provider. I’ve just added the same ProviderSample.cs file to my App_Code folder. But, I get 500 Error with below: Detailed Error Information
    Module PlaylistHandler
    Notification ExecuteRequestHandler
    Handler PlaylistHandler-D5178953-96A0-4ebd-B511-024897DA2C09-rpl
    Error Code 0x800401f3
     That error code corresponds to  CO_E_CLASSSTRING # Invalid class string.  While registering the provider, what should I register? Should I create a DLL for my .cs and use regAsm to register it? I’m confused L  Any clue?

     

  • 04-22-2008, 9:45 PM In reply to

    • vsood
    • Top 75 Contributor
    • Joined on 07-11-2007, 9:16 PM
    • Redmond
    • Posts 81

    Re: Issues with the sample provided

    If you are building the managed provider and look at the sample code in the walkthrough there is a Program ID:

    [Guid("D5178953-96A0-4ebd-B511-024897DA2C09")]
        [ProgId("SamplePlaylistProvider.ProviderSample")]
        [ComVisible(true)]
        public class PlaylistProvider : IPlaylistProvider
        {
            IPlaylistInfo IPlaylistProvider.GetPlaylistInfo(IPlaylistRequestInfo requestInfo)
            {
                String path = requestInfo.Path;
                String name = path.Substring(path.LastIndexOf('/') + 1);
                name = name.Substring(0, name.LastIndexOf(".")) + ".wmv";
                return new PlaylistInfo(Advertisement, name);
     

    Yes, you should build a managed dll and then regasm it. The following walkthrough steps do that (you can skip to the second step if you use shipped playlisthandler.dll) 

    Building a .net based provider

    Building a .net based provider is a two step process1.    

    Create a Type library (you can skip this step if you have access to released playlisthandler.dll)

    • midl /I<Path to Web Playlists Include> playlistprovider.idl /tlb playlistprovider.tlb /win32 
    • midl /I<Path to Web Playlists Include> playlistprovider.idl /tlb playlistprovider.tlb /x64
      where <Path to Web Playlist Include> is the location where unzipped the Interface files too.

    Import Types into as assemblely

    1.  Use the .tlb created in step 1

    tlbimp /out:<outputdirectory>\<outputprovidertypelib.tlb> /namespace:<Provider Namespace> <handler reference>

    (E.g., tlbimp /out:E:\myprovider\playlistprovder.dll /namespace:Microsoft.Web.Media.Playlist.Provider E:\myprovider\playlistprovider.tlb )

    2. Use the released playlisthandler.dll

    tlbimp /out:<outputdirectory>\<outputproviderdll.dll> /namespace:<Provider Namespace> <path to playlist handler>\playlisthandler.dll

    (E.g., tlbimp /out:E:\myprovider\playlistprovder.dll /namespace:Microsoft.Web.Media.Playlist.Provider E:\myprovider\playlisthandler.dll )
      

    Compile the custom provider with reference to assembly created in step2
    Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:TRACE
    /reference:..\playlistprovder.dll
    /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll
    /debug:pdbonly /filealign:512 /optimize+
    /out:obj\Release\providersample.dll
    /target:library AssemblyInfo.cs PlaylistProvider.cs

    The link to walkthrough is http://learn.iis.net/page.aspx/448/web-playlist-for-iis-70---extending-web-playlists

     

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

    • rakkimk
    • Not Ranked
    • Joined on 07-02-2006, 5:56 PM
    • Posts 4

    Re: Issues with the sample provided

    Okay - I changed it to have the ProgID, but still I've the same error coming up.

     Still no luck :(

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

    • vsood
    • Top 75 Contributor
    • Joined on 07-11-2007, 9:16 PM
    • Redmond
    • Posts 81

    Re: Issues with the sample provided

    Hi Rakki,

    Did you get a chance to try steps from Prakash's post and walkthrough.

    Regards

    Vishal

Page 1 of 1 (4 items)