New Webinterface (1 Viewer)

misterd

Retired Team Member
  • Premium Supporter
  • April 4, 2006
    1,597
    314
    Home Country
    Germany Germany
    Hi all,
    as said in my last post, I tried out Cassini last weekend. It's really a simple web server for .NET application.
    But my idea of integrating the whole web service into MP won't work, because the web server is running in its own application domain and so you don't have access to the MP objects from the web service. Perhaps somebody finds a solution for this, I haven't found any solution.
    With some modifications it can also run as a windows service and/or host multiple .NET applications. Also some basics security options can be easily added.
    In fact Cassini isn't a full web server like Apache or IIS, but it's simple, small and easy to use.

    Regards
    MisterD
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    You can get around the application domain problem - do a search for WebPlaylistManager on these forums: this guy created a web interface for managing your music playlists and music playback control and it uses cassini (I'm pretty sure anyway).

    Another solution is to use WCF in .NET 3.0. There's some really nice videos out there explaining it, but in short, to create a SOAP web service, all you have to do is add a few attributes to the class you want to expose and that's about it (ok, simplifying it a fair bit, but you get the idea). But it probably isn't viable right now asking people to download another 54MB framework just for this functionality. Maybe when MP moves on to WPF...

    Sam
     

    thechad

    Portal Pro
    February 5, 2005
    187
    0
    Geelong, Australia
    Home Country
    I too had a look at adapting the Cassini web server to work as a plugin for the TVServer service, however I ran into problems in the appdomain area as well. But this was while the plugin is starting up and as the TVServer uses Remoting I don't need access to the MP AppDomain as I can just use the provided dll (I think?).

    I can run library fine from a test console app but when I run as a plugin i get an exception

    Code:
    5/12/2006 7:00:20 PM Exception   :System.InvalidCastException: Unable to cast transparent proxy to type 'Cassini.Host'.
       at Cassini.Server.CreateHost()
       at Cassini.Server..ctor(Int32 port, String virtualPath, String physicalPath)
       at TVServerWeb.TVServerWeb.Start()
    5/12/2006 7:00:20 PM Exception   :Unable to cast transparent proxy to type 'Cassini.Host'.
    5/12/2006 7:00:20 PM   site      :Void CreateHost()
    5/12/2006 7:00:20 PM   source    :MPWeb
    5/12/2006 7:00:20 PM   stacktrace:   at Cassini.Server.CreateHost()
       at Cassini.Server..ctor(Int32 port, String virtualPath, String physicalPath)
       at TVServerWeb.TVServerWeb.Start()

    This happens on the cast to Host type in the createHost function
    Code:
    private void CreateHost() {
                _host = (Host)ApplicationHost.CreateApplicationHost(typeof(Host), _virtualPath, _physicalPath);
                _host.Configure(this, _port, _virtualPath, _physicalPath, _installPath);
            }

    I had a look through the source of the playlist manager and it looks no different to what I am trying to do.

    Any tips cause I am out of my league here?

    I agree Sam that WCF is looking like it may be the easiest and trouble free way to implement this.

    On another note in regards to the appdomain issue and how jlewalle got around it in the playlist manager plugin, is this the best way to do it or would another layer possibly remoting in MP be better as it did not seem to flexible for change from the code I looked at, however as I said I am out of my league here.

    Cheers for the rant,

    Chad
     

    hobbes487

    Portal Pro
    August 25, 2005
    208
    3
    Home Country
    United States of America United States of America
    I hope it isn't dead. This is something I have been wanting since I started using MP
     

    quiller

    Portal Pro
    November 28, 2006
    90
    1
    39
    Nebraska
    Home Country
    United States of America United States of America
    Is the actual front-end interface still worked on? I know that the plugin itself hasn't been updated for awhile, but I started cloning the main MP website to the MPW skin. I'd be happy to release the code to the MPW team, and to continue optimizing/updating (it's 2007, time for some svelt Web 2.0 crap!), but where do I go?

     

    Noelix

    Portal Pro
    February 18, 2006
    393
    1
    Salt Lake City, UT
    Home Country
    United States of America United States of America
    Is the actual front-end interface still worked on? I know that the plugin itself hasn't been updated for awhile, but I started cloning the main MP website to the MPW skin. I'd be happy to release the code to the MPW team, and to continue optimizing/updating (it's 2007, time for some svelt Web 2.0 crap!), but where do I go?


    Looks nice, you should chat up the developers in the irc channel if you are interested in working on it.
     

    AdmiralUD

    Portal Member
    September 15, 2006
    14
    0
    Any movement on this?

    I am starting my own mediaportal web interface, thought I would check the status of this thread.

    I agree with many of the ideas expressed here, here are my intentions:

    - XHTML/CSS interface powered by asp.net (written in c#), communicating with TvServer3 via its database. I do not see a reason to put a layer between them, all of the data is available easily and quickly through the database.

    - Variable hosting options, IIS, installable Cassini or perhaps a hosted instance of cassini...I dont consider this to be a decision that needs to be made now as it will not change the way the interface is coded.

    - ASP.NET Ajax frontend system (formerly Atlas), using ajax to do things like load the guide, view show details, album details, etc...I have already started a prototype of the ajax guide...its ugly but functional, screenshot below.

    - Interfaces for TV, Music, Video etc...some form of streaming (wmp, ?)

    Are there people who are looking to help? I could setup an svn repo for it...
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    Any movement on this?

    I am starting my own mediaportal web interface, thought I would check the status of this thread.

    I agree with many of the ideas expressed here, here are my intentions:

    - XHTML/CSS interface powered by asp.net (written in c#), communicating with TvServer3 via its database. I do not see a reason to put a layer between them, all of the data is available easily and quickly through the database.

    - Variable hosting options, IIS, installable Cassini or perhaps a hosted instance of cassini...I dont consider this to be a decision that needs to be made now as it will not change the way the interface is coded.

    - ASP.NET Ajax frontend system (formerly Atlas), using ajax to do things like load the guide, view show details, album details, etc...I have already started a prototype of the ajax guide...its ugly but functional, screenshot below.

    - Interfaces for TV, Music, Video etc...some form of streaming (wmp, ?)

    Are there people who are looking to help? I could setup an svn repo for it...

    Hi AdmiralUD and everyone else,

    I know progress on the new web interface has been extremely slow, but I've just started work on updating the ECP2 plugin for the new client/server configuration. This forms the base of the web-interface, e.g. send MP commands, add recordings, get connected clients, play songs etc. I've refrained from saying anything because I don't like raising expectations and then having everyone disappointed when they don't come, so I rather talk when I have something to show.

    AdmiralUD - its good that someone else is coming to the table with the skills needed for this. Your plans are basically what I've had in mind, so we're not too far off track.

    I do have issues with this point:
    XHTML/CSS interface powered by asp.net (written in c#), communicating with TvServer3 via its database. I do not see a reason to put a layer between them, all of the data is available easily and quickly through the database.

    I believe there should be a layer, and that layer should be the native MP methods. Why? Because then we don't have to worry about any changes that are made to the database structure, and also the way that MP operates. For example, if you add a recording directly to the database, I don't believe that MP will know about that, hence it should be added via MP (yes, this can be worked around using notifications, but its just an example). It means less work overall because we're not creating our own database code and updating it everytime it changes in MP.

    About the svn-repo, I can add you into the mp-webinterface sourceforge project if you like.

    Sam
     

    Users who are viewing this thread

    Top Bottom