Config File for COM+

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

    Config File for COM+

    Hi All, I have created a COM+ Component Foo.dll, I was wondering where I can
    store its Config File and what should I name it?
    this COM+ Component calls a WebSvc too! the IDE Created an app.config for me
    in the project workspace but somehow that isn't working....

    TIA


  • Sahil Malik [MVP]

    #2
    Re: Config File for COM+

    The config file should be web.config for ASP.NET and
    <<exename>>.con fig for other EXEs.

    BTW, the config file thing is .NET only. I am wondering if you wrote a COM+
    component using unmanaged code, then this might not work.

    - Sahil Malik [MVP]
    ADO.NET 2.0 book -

    -------------------------------------------------------------------------------------------

    "Vai2000" <nospam@microso ft.com> wrote in message
    news:%23DUXw25k FHA.2156@TK2MSF TNGP14.phx.gbl. ..[color=blue]
    > Hi All, I have created a COM+ Component Foo.dll, I was wondering where I
    > can
    > store its Config File and what should I name it?
    > this COM+ Component calls a WebSvc too! the IDE Created an app.config for
    > me
    > in the project workspace but somehow that isn't working....
    >
    > TIA
    >
    >[/color]


    Comment

    • Vai2000

      #3
      Re: Config File for COM+

      I have written Serviced Component and need an XML Config for it as it calls
      a WS whose WSDL changes frequently
      and due to other reasons too, we need Config

      TIA


      "Sahil Malik [MVP]" <contactmethrum yblog@nospam.co m> wrote in message
      news:%239k1CW6k FHA.3448@TK2MSF TNGP12.phx.gbl. ..[color=blue]
      > The config file should be web.config for ASP.NET and
      > <<exename>>.con fig for other EXEs.
      >
      > BTW, the config file thing is .NET only. I am wondering if you wrote a[/color]
      COM+[color=blue]
      > component using unmanaged code, then this might not work.
      >
      > - Sahil Malik [MVP]
      > ADO.NET 2.0 book -
      > http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
      > --------------------------------------------------------------------------[/color]
      -----------------[color=blue]
      >
      > "Vai2000" <nospam@microso ft.com> wrote in message
      > news:%23DUXw25k FHA.2156@TK2MSF TNGP14.phx.gbl. ..[color=green]
      > > Hi All, I have created a COM+ Component Foo.dll, I was wondering where I
      > > can
      > > store its Config File and what should I name it?
      > > this COM+ Component calls a WebSvc too! the IDE Created an app.config[/color][/color]
      for[color=blue][color=green]
      > > me
      > > in the project workspace but somehow that isn't working....
      > >
      > > TIA
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Nicholas Paldino [.NET/C# MVP]

        #4
        Re: Config File for COM+

        Vai2000,

        You should be able to name it the name of the assembly that is the entry
        point with an xml extension, and it should work (assuming that this is an
        out of process component).

        Hope this helps.


        --
        - Nicholas Paldino [.NET/C# MVP]
        - mvp@spam.guard. caspershouse.co m

        "Vai2000" <nospam@microso ft.com> wrote in message
        news:O63w7X6kFH A.3544@TK2MSFTN GP15.phx.gbl...[color=blue]
        >I have written Serviced Component and need an XML Config for it as it calls
        > a WS whose WSDL changes frequently
        > and due to other reasons too, we need Config
        >
        > TIA
        >
        >
        > "Sahil Malik [MVP]" <contactmethrum yblog@nospam.co m> wrote in message
        > news:%239k1CW6k FHA.3448@TK2MSF TNGP12.phx.gbl. ..[color=green]
        >> The config file should be web.config for ASP.NET and
        >> <<exename>>.con fig for other EXEs.
        >>
        >> BTW, the config file thing is .NET only. I am wondering if you wrote a[/color]
        > COM+[color=green]
        >> component using unmanaged code, then this might not work.
        >>
        >> - Sahil Malik [MVP]
        >> ADO.NET 2.0 book -
        >> http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
        >> --------------------------------------------------------------------------[/color]
        > -----------------[color=green]
        >>
        >> "Vai2000" <nospam@microso ft.com> wrote in message
        >> news:%23DUXw25k FHA.2156@TK2MSF TNGP14.phx.gbl. ..[color=darkred]
        >> > Hi All, I have created a COM+ Component Foo.dll, I was wondering where
        >> > I
        >> > can
        >> > store its Config File and what should I name it?
        >> > this COM+ Component calls a WebSvc too! the IDE Created an app.config[/color][/color]
        > for[color=green][color=darkred]
        >> > me
        >> > in the project workspace but somehow that isn't working....
        >> >
        >> > TIA
        >> >
        >> >[/color]
        >>
        >>[/color]
        >
        >[/color]


        Comment

        • Vai2000

          #5
          Re: Config File for COM+

          Well I tried creating foo.dll.config and dllhost.exe.con fig
          but they aren't working. :(


          "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> wrote in
          message news:O8Wlkf6kFH A.576@TK2MSFTNG P15.phx.gbl...[color=blue]
          > Vai2000,
          >
          > You should be able to name it the name of the assembly that is the[/color]
          entry[color=blue]
          > point with an xml extension, and it should work (assuming that this is an
          > out of process component).
          >
          > Hope this helps.
          >
          >
          > --
          > - Nicholas Paldino [.NET/C# MVP]
          > - mvp@spam.guard. caspershouse.co m
          >
          > "Vai2000" <nospam@microso ft.com> wrote in message
          > news:O63w7X6kFH A.3544@TK2MSFTN GP15.phx.gbl...[color=green]
          > >I have written Serviced Component and need an XML Config for it as it[/color][/color]
          calls[color=blue][color=green]
          > > a WS whose WSDL changes frequently
          > > and due to other reasons too, we need Config
          > >
          > > TIA
          > >
          > >
          > > "Sahil Malik [MVP]" <contactmethrum yblog@nospam.co m> wrote in message
          > > news:%239k1CW6k FHA.3448@TK2MSF TNGP12.phx.gbl. ..[color=darkred]
          > >> The config file should be web.config for ASP.NET and
          > >> <<exename>>.con fig for other EXEs.
          > >>
          > >> BTW, the config file thing is .NET only. I am wondering if you wrote a[/color]
          > > COM+[color=darkred]
          > >> component using unmanaged code, then this might not work.
          > >>
          > >> - Sahil Malik [MVP]
          > >> ADO.NET 2.0 book -
          > >> http://codebetter.com/blogs/sahil.ma.../13/63199.aspx[/color][/color]
          >[color=green]
          >> -------------------------------------------------------------------------[/color][/color]
          -[color=blue][color=green]
          > > -----------------[color=darkred]
          > >>
          > >> "Vai2000" <nospam@microso ft.com> wrote in message
          > >> news:%23DUXw25k FHA.2156@TK2MSF TNGP14.phx.gbl. ..
          > >> > Hi All, I have created a COM+ Component Foo.dll, I was wondering[/color][/color][/color]
          where[color=blue][color=green][color=darkred]
          > >> > I
          > >> > can
          > >> > store its Config File and what should I name it?
          > >> > this COM+ Component calls a WebSvc too! the IDE Created an app.config[/color]
          > > for[color=darkred]
          > >> > me
          > >> > in the project workspace but somehow that isn't working....
          > >> >
          > >> > TIA
          > >> >
          > >> >
          > >>
          > >>[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Willy Denoyette [MVP]

            #6
            Re: Config File for COM+

            If it's a "library" type component, it's up to the calling EXE to read the
            config file.
            For a "server" type application it's not that easy. This is because the host
            process is Dllhost.exe which can't/doesn't have a config file, all Server
            types share the same host Dllhost.exe, you don't want your config file to be
            used by all dllhosts.exe don't you?
            Now what you could do is the following:
            1. Set the application root of your COM+ application to a specific
            directory, any directory will do, just make them different for each
            application.
            2. Create an application manifest file in this directory, name it
            'application.ma nifest'. This file is just a normal manifest that describes
            the dependencies. Note that this can be as simple as...
            <?xml version="1.0" encoding="UTF-8" standalone="yes "?>
            <assembly xmlns="urn:sche mas-microsoft-com:asm.v1"
            manifestVersion ="1.0">
            </assembly>
            3 Add your normal config file to this same directory and rename it as
            'application.co nfig'
            With this in place your COM+ server type application can access its own
            config info through the normal API's.



            Willy.

            "Vai2000" <nospam@microso ft.com> wrote in message
            news:%23DUXw25k FHA.2156@TK2MSF TNGP14.phx.gbl. ..[color=blue]
            > Hi All, I have created a COM+ Component Foo.dll, I was wondering where I
            > can
            > store its Config File and what should I name it?
            > this COM+ Component calls a WebSvc too! the IDE Created an app.config for
            > me
            > in the project workspace but somehow that isn't working....
            >
            > TIA
            >
            >[/color]


            Comment

            • Vai2000

              #7
              Re: Config File for COM+

              Great, thanks, that sounds convincing

              "Willy Denoyette [MVP]" <willy.denoyett e@telenet.be> wrote in message
              news:%23OcvtICl FHA.2472@TK2MSF TNGP15.phx.gbl. ..[color=blue]
              > If it's a "library" type component, it's up to the calling EXE to read the
              > config file.
              > For a "server" type application it's not that easy. This is because the[/color]
              host[color=blue]
              > process is Dllhost.exe which can't/doesn't have a config file, all Server
              > types share the same host Dllhost.exe, you don't want your config file to[/color]
              be[color=blue]
              > used by all dllhosts.exe don't you?
              > Now what you could do is the following:
              > 1. Set the application root of your COM+ application to a specific
              > directory, any directory will do, just make them different for each
              > application.
              > 2. Create an application manifest file in this directory, name it
              > 'application.ma nifest'. This file is just a normal manifest that describes
              > the dependencies. Note that this can be as simple as...
              > <?xml version="1.0" encoding="UTF-8" standalone="yes "?>
              > <assembly xmlns="urn:sche mas-microsoft-com:asm.v1"
              > manifestVersion ="1.0">
              > </assembly>
              > 3 Add your normal config file to this same directory and rename it as
              > 'application.co nfig'
              > With this in place your COM+ server type application can access its own
              > config info through the normal API's.
              >
              >
              >
              > Willy.
              >
              > "Vai2000" <nospam@microso ft.com> wrote in message
              > news:%23DUXw25k FHA.2156@TK2MSF TNGP14.phx.gbl. ..[color=green]
              > > Hi All, I have created a COM+ Component Foo.dll, I was wondering where I
              > > can
              > > store its Config File and what should I name it?
              > > this COM+ Component calls a WebSvc too! the IDE Created an app.config[/color][/color]
              for[color=blue][color=green]
              > > me
              > > in the project workspace but somehow that isn't working....
              > >
              > > TIA
              > >
              > >[/color]
              >
              >[/color]


              Comment

              Working...