Loading Class Library From FTP Location To Memory

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Coder

    #1

    Loading Class Library From FTP Location To Memory

    After deploying main application using Clickonce,

    Is this possible for this dot net application to download a class library
    from an ftp or http location (as only one dll) and to use it just in memory
    (I dont like to save it somewhere, just load into memory and use it) ? Next
    time someome want s to use that class library, will download and use again
    and again and again.

    My purpose is I have a main application and according to the logged user, I
    ll perform above issue and show a form to user (lots of other forms (class
    libs) will be available)

    Possible ?

    Thanks a Lot


  • Family Tree Mike

    #2
    Re: Loading Class Library From FTP Location To Memory

    Well, it looks like your code could use WebClient.Downl oadData(url) to get
    the dll as an array of bytes, then call Assembly.Load(b yte []) to load it.
    I've never tried this though, but it seems possible. I've got to believe
    there are some security settings that would prevent it though.

    "Coder" <Someone@Somewh ere.Co.Ukwrote in message
    news:uWt9h4aOJH A.1488@TK2MSFTN GP03.phx.gbl...
    After deploying main application using Clickonce,
    >
    Is this possible for this dot net application to download a class library
    from an ftp or http location (as only one dll) and to use it just in
    memory (I dont like to save it somewhere, just load into memory and use
    it) ? Next time someome want s to use that class library, will download
    and use again and again and again.
    >
    My purpose is I have a main application and according to the logged user,
    I ll perform above issue and show a form to user (lots of other forms
    (class libs) will be available)
    >
    Possible ?
    >
    Thanks a Lot
    >

    Comment

    • Coder

      #3
      Re: Loading Class Library From FTP Location To Memory


      Thanks for your reply,

      You show me a good way but I ll try to do using webservice (returns byte[]
      array) instead of downloading dll file, cos I ll use dll based
      authentication and planning my web service accept some parameters (usercode,
      pass, dllname, etc..) and gives me desired dll as bytearray, every dll will
      have same method like ( showsomething() ) and main app will call it.

      I ll track the logs on my web service side

      Thanks for all, researching in progress :)



      "Family Tree Mike" <FamilyTreeMike @ThisOldHouse.c omwrote in message
      news:e$8jcHhOJH A.1148@TK2MSFTN GP05.phx.gbl...
      Well, it looks like your code could use WebClient.Downl oadData(url) to get
      the dll as an array of bytes, then call Assembly.Load(b yte []) to load it.
      I've never tried this though, but it seems possible. I've got to believe
      there are some security settings that would prevent it though.
      >
      "Coder" <Someone@Somewh ere.Co.Ukwrote in message
      news:uWt9h4aOJH A.1488@TK2MSFTN GP03.phx.gbl...
      >After deploying main application using Clickonce,
      >>
      >Is this possible for this dot net application to download a class library
      >from an ftp or http location (as only one dll) and to use it just in
      >memory (I dont like to save it somewhere, just load into memory and use
      >it) ? Next time someome want s to use that class library, will download
      >and use again and again and again.
      >>
      >My purpose is I have a main application and according to the logged user,
      >I ll perform above issue and show a form to user (lots of other forms
      >(class libs) will be available)
      >>
      >Possible ?
      >>
      >Thanks a Lot
      >>
      >
      >

      Comment

      • Family Tree Mike

        #4
        Re: Loading Class Library From FTP Location To Memory

        The web service is fine, but to clarify, my security concern was that the
        client machine would let code be executed from a byte array not stored
        locally.

        "Coder" <Someone@Somewh ere.Co.Ukwrote in message
        news:%23XwpucqO JHA.4304@TK2MSF TNGP05.phx.gbl. ..
        >
        Thanks for your reply,
        >
        You show me a good way but I ll try to do using webservice (returns byte[]
        array) instead of downloading dll file, cos I ll use dll based
        authentication and planning my web service accept some parameters
        (usercode, pass, dllname, etc..) and gives me desired dll as bytearray,
        every dll will have same method like ( showsomething() ) and main app will
        call it.
        >
        I ll track the logs on my web service side
        >
        Thanks for all, researching in progress :)
        >
        >
        >
        "Family Tree Mike" <FamilyTreeMike @ThisOldHouse.c omwrote in message
        news:e$8jcHhOJH A.1148@TK2MSFTN GP05.phx.gbl...
        >Well, it looks like your code could use WebClient.Downl oadData(url) to
        >get the dll as an array of bytes, then call Assembly.Load(b yte []) to
        >load it. I've never tried this though, but it seems possible. I've got
        >to believe there are some security settings that would prevent it
        >though.
        >>
        >"Coder" <Someone@Somewh ere.Co.Ukwrote in message
        >news:uWt9h4aOJ HA.1488@TK2MSFT NGP03.phx.gbl.. .
        >>After deploying main application using Clickonce,
        >>>
        >>Is this possible for this dot net application to download a class
        >>library from an ftp or http location (as only one dll) and to use it
        >>just in memory (I dont like to save it somewhere, just load into memory
        >>and use it) ? Next time someome want s to use that class library, will
        >>download and use again and again and again.
        >>>
        >>My purpose is I have a main application and according to the logged
        >>user, I ll perform above issue and show a form to user (lots of other
        >>forms (class libs) will be available)
        >>>
        >>Possible ?
        >>>
        >>Thanks a Lot
        >>>
        >>
        >>
        >
        >

        Comment

        • Coder

          #5
          Re: Loading Class Library From FTP Location To Memory


          I ll try this issue, and really curious about it :)


          "Family Tree Mike" <yFamilyTreeMik e@ThisOldHouse. comwrote in message
          news:OK54ATtOJH A.3980@TK2MSFTN GP06.phx.gbl...
          The web service is fine, but to clarify, my security concern was that the
          client machine would let code be executed from a byte array not stored
          locally.
          >
          "Coder" <Someone@Somewh ere.Co.Ukwrote in message
          news:%23XwpucqO JHA.4304@TK2MSF TNGP05.phx.gbl. ..
          >>
          >Thanks for your reply,
          >>
          >You show me a good way but I ll try to do using webservice (returns
          >byte[] array) instead of downloading dll file, cos I ll use dll based
          >authenticati on and planning my web service accept some parameters
          >(usercode, pass, dllname, etc..) and gives me desired dll as bytearray,
          >every dll will have same method like ( showsomething() ) and main app
          >will call it.
          >>
          >I ll track the logs on my web service side
          >>
          >Thanks for all, researching in progress :)
          >>
          >>
          >>
          >"Family Tree Mike" <FamilyTreeMike @ThisOldHouse.c omwrote in message
          >news:e$8jcHhOJ HA.1148@TK2MSFT NGP05.phx.gbl.. .
          >>Well, it looks like your code could use WebClient.Downl oadData(url) to
          >>get the dll as an array of bytes, then call Assembly.Load(b yte []) to
          >>load it. I've never tried this though, but it seems possible. I've got
          >>to believe there are some security settings that would prevent it
          >>though.
          >>>
          >>"Coder" <Someone@Somewh ere.Co.Ukwrote in message
          >>news:uWt9h4aO JHA.1488@TK2MSF TNGP03.phx.gbl. ..
          >>>After deploying main application using Clickonce,
          >>>>
          >>>Is this possible for this dot net application to download a class
          >>>library from an ftp or http location (as only one dll) and to use it
          >>>just in memory (I dont like to save it somewhere, just load into memory
          >>>and use it) ? Next time someome want s to use that class library, will
          >>>download and use again and again and again.
          >>>>
          >>>My purpose is I have a main application and according to the logged
          >>>user, I ll perform above issue and show a form to user (lots of other
          >>>forms (class libs) will be available)
          >>>>
          >>>Possible ?
          >>>>
          >>>Thanks a Lot
          >>>>
          >>>
          >>>
          >>
          >>
          >
          >

          Comment

          Working...