Re: Config file for assembly called by Commerce Server 2002 pipeline

From: Steve Willcock (steve_at_N-O-S-P-A-Mwillcockconsulting.com)
Date: 08/12/04


Date: Thu, 12 Aug 2004 11:16:06 +0100

Martin, your assumptions on configuring the assembly seem a bit wrong - read
the following articles for help with this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcreatingnewsectionhandlers.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpgrfaccessingaspnetconfigurationsettings.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfappsettingselement.asp

To keep things simple at least to start with you might want to hold this
config info in appSettings then you don't have to create an
IConfigurationSectionHandler implementation in your class.

You're right about the file names for the configuration settings for windows
and asp.net apps.

For the commerce server pipeline component configuration settings, I'd try
putting them in the web.config file for the commerce server app that is
calling the pipeline and seeing if that works.

-- 
Steve Will*** (MCSD for Microsoft.NET)
http://www.willcockconsulting.com/
"Martin" <x@y.z> wrote in message
news:uyMe47EgEHA.1644@tk2msftngp13.phx.gbl...
> Hi,
>
> I'm creating an assembly that has some configuration requirements (eg
access
> credentials to perform a service).
>
> I guess my config settings would go in myapp.exe.config (windows app) or
> web.config (asp.net app) like so...
>
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
>     <configSections>
>         <section name="myAssemblySection"
>                  type="System.Configuration.MyAssemblySectionHandler" />
>     </configSections>
>
>     <myAssemblySection name="myname" password="LJOIOIJSDLKJOIJOIUYRET"  />
>
> </configuration>
>
> I suppose I should access this file like so
> System.ConfigurationSettings.GetConfig(...)
>
> My assembly is called by the following two routes:
> 1) Commerce Server pipeline (COM interop dll)
> 2) an ASP.Net app.
>
> I have two requests:
> 1)Please confirm my assumptions above on configuring my assembly.
> 2) Will the Commerce Server pipeline route work?  ie what config file will
> it try to look in?
>
>
> Thanks
> Martin
>
>