Re: app.config xml file and application blocks

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Christoph Schittko [MVP] (INVALIDEMAIL_at_austin.rr.com)
Date: 11/16/04


Date: Mon, 15 Nov 2004 22:03:44 -0600


I swear I loaded .dll.config files before for assemblies back in the
.net 1.0 days but I guess it wasn't intended behavior and it's no longer
working.

To use the exception management block you need to add the required
configuration elements in the app.config or the web.config file of the
executing application or web service.

If you don't build that app.config file because you're using the
exception management block in a class library assembly, not in an
application, then you need to document that requirement for the
developers that consume your class library.

I apologize for any confusion.

Christoph

> -----Original Message-----
> From: grs [mailto:gsmith@budgetext.com]
> Posted At: Monday, November 15, 2004 3:43 PM
> Posted To: microsoft.public.dotnet.xml
> Conversation: app.config xml file and application blocks
> Subject: Re: app.config xml file and application blocks
>
> Christoph,
> thanks for reply. "What exactly are you looking to do?" = I wish to
use
> the
> exception management application block in a class library. Would the
> application block read the config settings - what would I name the
config
> file ?? Any example would really would be appreciated.
>
> thanks
> grs
>
> "Christoph Schittko [MVP]" <INVALIDEMAIL@austin.rr.com> wrote in
message
> news:O9TClD1yEHA.3024@TK2MSFTNGP14.phx.gbl...
> > Yes, a class library can have .config file, but you have to do the
> > copying and naming by hand. Visual Studio only renames and copies
> > app.config files automatically for you.
> >
> > As you already found, that behavior is not really documented and the
> > expected usage is to add settings for the application blocks to the
> > app.config/web.config file of your application. As a
developer/vendor of
> > a class library, you need to document these expectations when you
only
> > ship a library, which is what Microsoft does with WSE for example.
> >
> > What exactly are you looking to do?
> >
> > HTH,
> > Christoph Schittko
> > MS MVP XML
> > http://weblogs.asp.net/cschittko
> >
> >
> > > -----Original Message-----
> > > From: grs [mailto:gsmith@budgetext.com]
> > > Posted At: Monday, November 15, 2004 1:57 PM
> > > Posted To: microsoft.public.dotnet.xml
> > > Conversation: app.config xml file and application blocks
> > > Subject: app.config xml file and application blocks
> > >
> > > Can a class library have a app.config file. Reason for asking is
that
> > the
> > > microsoft application blocks all read from myApp.exe.config. How
can
> > you
> > > use
> > > the application blocks if you do not have an app.config file.
> > >
> > > Wish someone from microsoft would answer this, I am at a loss.
> > >
> > > thanks
> > > grs
> >
> >



Relevant Pages

  • Re: AppDomain.GetAssemblies broken?
    ... What exactly do you mean with "touch the web config", ... check where the assemblies are loaded. ... > The transition between the two assemblies is not done through AppDomain, ...
    (microsoft.public.dotnet.framework.clr)
  • Re: App.config use from UserControl Assembly
    ... require me to hard code information about the assemblies which I would like ... Some of these UI controls I ... are used in an application and can read from that application's *.config ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: SW suitable for large machines?
    ... I was just working on a 2 part assembly that because of a bad technique ... Most of the problems I see with people having trouble with assemblies is ... can't unbreak a broken reference, but you can unlock a locked reference. ... the open dialog you can create a new assy config that automatically ...
    (comp.cad.solidworks)
  • Re: SW suitable for large machines?
    ... > combination of technique and settings. ... > Most of the problems I see with people having trouble with assemblies is ... > can't unbreak a broken reference, but you can unlock a locked reference. ... > the open dialog you can create a new assy config that automatically ...
    (comp.cad.solidworks)
  • Re: Server Error
    ... Did you reinstall the framework, ... >> assemblies are not the culprit. ... >> Christoph Schittko ...
    (microsoft.public.dotnet.framework.aspnet.webservices)