ASP.Net app, Class Library and Web Service

Discussion in 'ASP .Net Web Services' started by Joe Reazor, Jul 23, 2003.

  1. Joe Reazor

    Joe Reazor Guest

    I have an ASP.Net application that uses some Class Libraries (dll's) that I
    created separately. One of these dll's connects to a Web Service. I
    created the Web Reference to my web service and doing so creates my
    App.Config file. I thought I would then be able to use the config file to
    specify where the Web Service existed to connect to. The problem is that I
    found out that Class Libraries (dll's) don't have their own config files,
    they must use the config files of their containing app. In this case its a
    web app. So I try adding the appropriate settings in the Web.Config file
    hoping that it would be picked up by my dll, but no luck. Is there
    something I am missing? Is this possible in the standard method that
    everyone says to use, is there some other way, or am I screwed and I will be
    stuck recompiling my dll every time I want to change the host of the web
    service.

    TIA for any help.


    ==============
    Joe Reazor
    Gorbel Inc.
    email: joereaATgorbelDOTcom
    Joe Reazor, Jul 23, 2003
    #1
    1. Advertising

  2. settings within web.config should be retrievable from your DLL ;
    I do this and it works for me.

    do you use System.Configuration.ConfigurationSettings.AppSettings??

    What is the problem you are seeing?


    "Joe Reazor" <> wrote in message
    news:...
    > I have an ASP.Net application that uses some Class Libraries (dll's) that

    I
    > created separately. One of these dll's connects to a Web Service. I
    > created the Web Reference to my web service and doing so creates my
    > App.Config file. I thought I would then be able to use the config file to
    > specify where the Web Service existed to connect to. The problem is that I
    > found out that Class Libraries (dll's) don't have their own config files,
    > they must use the config files of their containing app. In this case its

    a
    > web app. So I try adding the appropriate settings in the Web.Config file
    > hoping that it would be picked up by my dll, but no luck. Is there
    > something I am missing? Is this possible in the standard method that
    > everyone says to use, is there some other way, or am I screwed and I will

    be
    > stuck recompiling my dll every time I want to change the host of the web
    > service.
    >
    > TIA for any help.
    >
    >
    > ==============
    > Joe Reazor
    > Gorbel Inc.
    > email: joereaATgorbelDOTcom
    >
    >
    Dino Chiesa [MSFT], Jul 23, 2003
    #2
    1. Advertising

  3. Joe Reazor

    Joe Reazor Guest

    I'll give that a try. In the examples I had seen it looked like an
    application that was using a Web Service would automatically read the web
    service's location from the config file. I didn't think there was anything
    else I needed to do other than to add the web reference and keep the config
    file with my app. So with a web app I need to do the extra step to read
    from the configuration settings and set the URL of the web service object.
    Maybe I would need to do this with a regular executable, but I didn't think
    so. That's why I was getting confused.


    ==============
    Joe Reazor
    Gorbel Inc.
    email: joereaATgorbelDOTcom

    "Dino Chiesa [MSFT]" <> wrote in message
    news:#$...
    > settings within web.config should be retrievable from your DLL ;
    > I do this and it works for me.
    >
    > do you use System.Configuration.ConfigurationSettings.AppSettings??
    >
    > What is the problem you are seeing?
    >
    >
    > "Joe Reazor" <> wrote in message
    > news:...
    > > I have an ASP.Net application that uses some Class Libraries (dll's)

    that
    > I
    > > created separately. One of these dll's connects to a Web Service. I
    > > created the Web Reference to my web service and doing so creates my
    > > App.Config file. I thought I would then be able to use the config file

    to
    > > specify where the Web Service existed to connect to. The problem is that

    I
    > > found out that Class Libraries (dll's) don't have their own config

    files,
    > > they must use the config files of their containing app. In this case

    its
    > a
    > > web app. So I try adding the appropriate settings in the Web.Config

    file
    > > hoping that it would be picked up by my dll, but no luck. Is there
    > > something I am missing? Is this possible in the standard method that
    > > everyone says to use, is there some other way, or am I screwed and I

    will
    > be
    > > stuck recompiling my dll every time I want to change the host of the web
    > > service.
    > >
    > > TIA for any help.
    > >
    > >
    > > ==============
    > > Joe Reazor
    > > Gorbel Inc.
    > > email: joereaATgorbelDOTcom
    > >
    > >

    >
    >
    Joe Reazor, Jul 24, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rico
    Replies:
    0
    Views:
    399
  2. =?Utf-8?B?YWNob28=?=
    Replies:
    2
    Views:
    4,671
    =?Utf-8?B?YWNob28=?=
    Feb 2, 2006
  3. Replies:
    1
    Views:
    491
    gkelly
    Nov 29, 2006
  4. Leo Violette
    Replies:
    2
    Views:
    502
    Leo Violette
    Apr 21, 2009
  5. Headless Rider

    Control asp.net app from other asp.net app

    Headless Rider, Aug 18, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    89
    Headless Rider
    Aug 18, 2003
Loading...

Share This Page