Cache a dll in Application_Start?

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

    Cache a dll in Application_Start?

    As long as my code is reentrant, can I cache a dll with assembly.load in
    my application_sta rt and then access it from the application cache, then
    invoke one of the methods inside it from multiple web service calls?

    Thanks in advance.

    Adam Smith

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • David Browne

    #2
    Re: Cache a dll in Application_Sta rt?


    "Adam Smith" <adam2001usa@ho tmail.com> wrote in message
    news:eTBXX0JpDH A.1632@TK2MSFTN GP10.phx.gbl...[color=blue]
    > As long as my code is reentrant, can I cache a dll with assembly.load in
    > my application_sta rt and then access it from the application cache, then
    > invoke one of the methods inside it from multiple web service calls?
    >[/color]

    Well, yes. But this is what happens if you just set a reference to the
    assembly, and start using it in your code.

    David


    Comment

    • Adam Smith

      #3
      Re: Cache a dll in Application_Sta rt?


      The reason I want to do an assembly.load at runtime is that I want to
      pick up the dll name and location from a database setting entry at
      startup, rather than hard coding the name.

      Adam Smith


      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      • David Browne

        #4
        Re: Cache a dll in Application_Sta rt?


        "Adam Smith" <adam2001usa@ho tmail.com> wrote in message
        news:%23nhmFSTp DHA.2416@TK2MSF TNGP10.phx.gbl. ..[color=blue]
        >
        > The reason I want to do an assembly.load at runtime is that I want to
        > pick up the dll name and location from a database setting entry at
        > startup, rather than hard coding the name.
        >[/color]

        That's fine. The same thing will happen. The assembly, once loaded, will
        stay loaded, and you can use the assembly reference to create types defined
        in that assembly.

        David


        Comment

        Working...