Dynamic Web Reference in Class Lib/GAC

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default Dynamic Web Reference in Class Lib/GAC

    Hello. I have a shared assembly with a reference to one of our web services.
    This web reference needs to be dynamic so that we can use different URLs
    between our different environments (dev, test, production). I see that an
    app.config file has been created in the assembly where I can put the
    different URLs, but where does this app.config reside if the shared assembly
    is inserted into the GAC?

    --
    Mike Logan
    Mike Logan Guest

  2. Similar Questions and Discussions

    1. URGENT: HowTo reference dynamically to a class name vb.net
      Hello Kevin, ok thanks, but can you give me an example how to reference dynamically to the class to call a method. Thanks, Andreas "Kevin...
    2. How-to reference AS scriptlets or MXML from an AS class?thx
      Hello all: I'm utilizing FlexUnit to test a Flex Application. This Unit testing framework is sorta like JUnit for Java. It requires all test...
    3. NEWBIE question: web reference to a proxy class
      Hi, I have used wsdl.exe to get the proxy class from a wsdl document that is saved locally on my comp. Can anyone please tell me how I can add a...
    4. Returning a reference to a class variable
      I have a class which contains (1) a class variable and (2) a method (e.g., methodA) which returns a reference to the class variable. If the...
    5. dynamic web reference
      change the 'URL Behavior' property of the web reference folder from static to dynamic.
  3. #2

    Default Re: Dynamic Web Reference in Class Lib/GAC

    Hello Mike,
    The shared app has to be used by an executeable/client application. The
    configuration for the shared assembly should be merged with the configuration
    of the executeable.

    HTH
    Regards,
    Dilip Krishnan
    MCAD, MCSD.net
    dkrishnan at geniant dot com
    [url]http://www.geniant.com[/url]
    > Hello. I have a shared assembly with a reference to one of our web
    > services. This web reference needs to be dynamic so that we can use
    > different URLs between our different environments (dev, test,
    > production). I see that an app.config file has been created in the
    > assembly where I can put the different URLs, but where does this
    > app.config reside if the shared assembly is inserted into the GAC?
    >

    Dilip Krishnan Guest

  4. #3

    Default Re: Dynamic Web Reference in Class Lib/GAC

    Dilip,

    We would like to avoid placing configuration information for the shared
    assembly in each web application. Can the shared assembly put configuration
    information into the Machine.Config?

    Thanks, Mike

    "Dilip Krishnan" wrote:
    > Hello Mike,
    > The shared app has to be used by an executeable/client application. The
    > configuration for the shared assembly should be merged with the configuration
    > of the executeable.
    >
    > HTH
    > Regards,
    > Dilip Krishnan
    > MCAD, MCSD.net
    > dkrishnan at geniant dot com
    > [url]http://www.geniant.com[/url]
    >
    > > Hello. I have a shared assembly with a reference to one of our web
    > > services. This web reference needs to be dynamic so that we can use
    > > different URLs between our different environments (dev, test,
    > > production). I see that an app.config file has been created in the
    > > assembly where I can put the different URLs, but where does this
    > > app.config reside if the shared assembly is inserted into the GAC?
    > >
    >
    >
    >
    Mike Logan Guest

  5. #4

    Default Re: Dynamic Web Reference in Class Lib/GAC

    Hello Mike,
    No the configuration will not get picked up by the application if you
    put it in the machine.config. It will only look for the <exename>/web.config.
    Not only that you dont want to mess up the machine.config as far as possible.

    HTH
    Regards,
    Dilip Krishnan
    MCAD, MCSD.net
    dkrishnan at geniant dot com
    [url]http://www.geniant.com[/url]
    > Dilip,
    >
    > We would like to avoid placing configuration information for the
    > shared assembly in each web application. Can the shared assembly put
    > configuration information into the Machine.Config?
    >
    > Thanks, Mike
    >
    > "Dilip Krishnan" wrote:
    >
    >> Hello Mike,
    >> The shared app has to be used by an executeable/client application.
    >> The
    >> configuration for the shared assembly should be merged with the
    >> configuration
    >> of the executeable.
    >> HTH
    >> Regards,
    >> Dilip Krishnan
    >> MCAD, MCSD.net
    >> dkrishnan at geniant dot com
    >> [url]http://www.geniant.com[/url]
    >>> Hello. I have a shared assembly with a reference to one of our web
    >>> services. This web reference needs to be dynamic so that we can use
    >>> different URLs between our different environments (dev, test,
    >>> production). I see that an app.config file has been created in the
    >>> assembly where I can put the different URLs, but where does this
    >>> app.config reside if the shared assembly is inserted into the GAC?
    >>>

    Dilip Krishnan Guest

  6. #5

    Default Re: Dynamic Web Reference in Class Lib/GAC

    I agree with Dilip, machine.config is not a good place for such
    information. Here is some options in my thoughts:

    1.Create a standalone XML or Text file, and save in a particular place so
    that your app can find it.
    2. Save such information in System registry
    3. Create a Assembly to manage such Url, and call it in your assembly.

    Luke

    [MSFT] Guest

  7. #6

    Default Re: Dynamic Web Reference in Class Lib/GAC

    Quote Originally Posted by Mike Logan View Post
    Hello. I have a shared assembly with a reference to one of our web services.
    This web reference needs to be dynamic so that we can use different URLs
    between our different environments (dev, test, production). I see that an
    app.config file has been created in the assembly where I can put the
    different URLs, but where does this app.config reside if the shared assembly
    is inserted into the GAC?

    --
    Mike Logan
    Has your posting been answered?
    Have you found or are you aware of a solution?

    If so - please would you share the answer as it would help me enormously.
    mrplatypus1 is offline Junior Member
    Join Date
    Jan 2012
    Posts
    1

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139