Shared dll between Asp.net and Windows Form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QWxwaGFwYWdl?=

    Shared dll between Asp.net and Windows Form

    Hello,

    I have a dll that I want to share between Asp.Net and Windows Form.
    The dll code is something like this:
    public List<stringlist ;
    public void Init()
    {
    list=new List<string>();
    }

    My Asp.net website initializes the generic list on page load, and when I
    click the button on my webpage, I add a new string to the list
    (list.Add("test ")). No problem.

    Now, from my Windows Form app I use a foreach to display all the string in
    the list and here comes the problem.
    I can't access the list that was running by my asp.net website from my
    Windows form app.

    How can I share that between Asp.Net and Windows Form ?

    Thanks in advance for your help.
  • Munna

    #2
    Re: Shared dll between Asp.net and Windows Form

    Hi,

    Asp.net application and you winform application running in two
    different app domain..
    this not likely that you will access list of asp.net process from a
    windows client directly..
    make a webclient request to the asp.net application to a perticular
    handler and handler should return the list as a string array
    parse the request and make a list in winform client...

    regards

    Munna

    Comment

    • Jay

      #3
      Re: Shared dll between Asp.net and Windows Form

      "Munna" <munnaonc@gmail .comwrote in message
      news:3695c2fe-0038-4082-979b-d3ab3b96c307@56 g2000hsm.google groups.com...
      Hi,
      >
      Asp.net application and you winform application running in two
      different app domain..
      this not likely that you will access list of asp.net process from a
      windows client directly..
      make a webclient request to the asp.net application to a perticular
      handler and handler should return the list as a string array
      parse the request and make a list in winform client...
      >
      regards
      >
      Munna

      or persist the list items data in a database and have both apps query the
      database for the items.

      Jay

      Comment

      • =?Utf-8?B?QWxwaGFwYWdl?=

        #4
        Re: Shared dll between Asp.net and Windows Form

        Thanks,

        The only way would be to do some kind of interprocess connection using IPC
        channel or query a db or query the webpage as you suggest

        Am I right ?

        Comment

        Working...