DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Kunle Odutola Guest

    Hosting Web Applications inside a WinForm application?

    Hi All,

    Does anyone have insights into how one might produce a WinForms application
    that essentially hosts an ASP/ASP.NET type application within a form (a bit
    like Outlook, MS Money, MMC, MSDNHelp etc..).

    What I am investigating is if it is possible to write a web application that
    can be hosted traditionally using ASP/ASP.NET and, can also hosted within a
    WinForm in a fat client app. I accept some basic changes may need to be made
    to the web app to work in the latter case.
    Kunle

    ---------------------------------------------------------
    "Java isn't platform independent; it is a platform.
    Like Windows, it is a proprietary commercial platform. "
    - Bjarne Stroustrup


  2. #2
    Paul Mc Guest

    Re: Hosting Web Applications inside a WinForm application?


    G'day Kunle .

    Do you neet the winforms app to interop with the webapp, or just run the
    webapp as if your form were ie?

    If you don't need the webapp to interact with your winapp, you could just
    add the "Microsoft Web Browser" com control (goto cutomize toolbox/com controls
    etc). Not particularly elegant, admittedly, but I got my winapp hosting a
    webapp like this in about 5 minutes...

    If you need the webapp to interact with your winapp, it is going to get a
    little messy. You could probably have the webapp referenced, then intercept
    and parse/display the webapp responses reasonably easily. Could get ugly
    with client side script though...

    Luck!
    Paul


    >
    >Does anyone have insights into how one might produce a WinForms application
    >that essentially hosts an ASP/ASP.NET type application within a form (a

    bit
    >like Outlook, MS Money, MMC, MSDNHelp etc..).
    >
    >What I am investigating is if it is possible to write a web application

    that
    >can be hosted traditionally using ASP/ASP.NET and, can also hosted within

    a
    >WinForm in a fat client app. I accept some basic changes may need to be

    made
    >to the web app to work in the latter case.
    >Kunle
    >
    >---------------------------------------------------------
    >"Java isn't platform independent; it is a platform.
    >Like Windows, it is a proprietary commercial platform. "
    >- Bjarne Stroustrup
    >



  3. #3
    Kunle Odutola Guest

    Re: Hosting Web Applications inside a WinForm application?


    "Paul Mc" <paulmc@nospam.thehub.com.au> wrote in message
    news:3b0f9350$1@news.devx.com...

    > G'day Kunle .


    G'day mate,

    > Do you neet the winforms app to interop with the webapp, or just run the
    > webapp as if your form were ie?


    It isn't really a WinForms app. It's just a container for the UI of the web
    app plus some code that allows the web app to run offline. Good examples are
    Outlook's UI, MS Money, etc..

    > If you don't need the webapp to interact with your winapp, you could just
    > add the "Microsoft Web Browser" com control (goto cutomize toolbox/com

    controls
    > etc). Not particularly elegant, admittedly, but I got my winapp hosting a
    > webapp like this in about 5 minutes...


    When you say hosting, do you mean in the sense of having an embedded
    web-browser control that can access a webserver?
    I mean that but in this case, the "webserver" isn't really a webserver but
    some locally running service within the application itself.
    I expect I will use custom URL protocols as does MSDN and HTMLHELP a la:
    ms-help://MSDNVS/vblr7/html/vastmclassx.htm
    Which may contain "client-side" script and "server-side" logic. Of course it
    is all in the same app.

    > If you need the webapp to interact with your winapp, it is going to get a
    > little messy. You could probably have the webapp referenced, then

    intercept
    > and parse/display the webapp responses reasonably easily. Could get ugly
    > with client side script though...


    It seems only a little messy conceptually but I just wondered it there was
    already support for it...

    Kunle



  4. #4
    Paul Mc Guest

    Re: Hosting Web Applications inside a WinForm application?


    G'day [again] Kunle

    >When you say hosting, do you mean in the sense of having an embedded
    >web-browser control that can access a webserver?


    Yeah, basically.

    >I mean that but in this case, the "webserver" isn't really a webserver but
    >some locally running service within the application itself.


    If the service was just spouting back HTML (even with client-side script)
    it should be easy enough. Maybe an object making requests of the service
    and chanelling the response into the embedded browser may be the easiest
    way? ie Bypass the actual physical ASP/ASP.NET page and addressing - bit
    more code but the problem I would see otherwise would be any <runat=Server>
    code contained in the ASP pages. I imagine that would require some kind of
    IIS emulation... I don't know of any controls/libraries to handle this stuff
    [hmm, anybody smell a gap in the component market "8-)]

    >It seems only a little messy conceptually but I just wondered it there was
    >already support for it...


    Not that I know of but that certainly doesn't mean "Definitely Not"! <g>

    Cheers,
    Paul

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links