Prueba con esta clase de 2003. tal vez cumpla con lo que necesitas.


Yo la utilizo y trabaja bién.



Tengo esta definición en el Web.Config



<appSettings>

<add key="elena2008.Directory.Path" value="D:\elecciones\elena2008\" />

<add key="elena2008.Virtual.Path" value="/elena2008/" />

<add key="elena2008.SMTP.Server" value="192.168.13.45" />

<add key="elena2008.SMTP.From" value="[EMAIL PROTECTED]" />

</appSettings>



y en el codigo leo los valores de esta manera



public string elenaDirectoryPath = 
ConfigurationSettings.AppSettings["elena2008.Directory.Path"];

 

public string elenaVirtualPath = 
ConfigurationSettings.AppSettings["elena2008.Virtual.Path"];

 

public string smtpServer = 
ConfigurationSettings.AppSettings["elena2008.SMTP.Server"];

 

public string smtpFrom = 
ConfigurationSettings.AppSettings["elena2008.SMTP.From""];



Espero te sirva sin problemas.





Saludos Roly



Provides access to configuration settings in a specified configuration section. 
This class cannot be inherited.

For a list of all members of this type, see ConfigurationSettings Members.

System.Object
   System.Configuration.ConfigurationSettings

[Visual Basic]
NotInheritable Public Class ConfigurationSettings
[C#]
public sealed class ConfigurationSettings
[C++]
public __gc __sealed class ConfigurationSettings
[JScript]
public class ConfigurationSettings
Thread Safety
Any public static (Shared in Visual Basic) members of this type are safe for 
multithreaded operations. Any instance members are not guaranteed to be thread 
safe.

Requirements
Namespace: System.Configuration

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 
2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 
family

Assembly: System (in System.dll)

  ----- Original Message ----- 
  From: Federico Lazarte 
  To: [email protected] 
  Sent: Wednesday, February 28, 2007 1:37 PM
  Subject: [puntonet] DLL con archivo de configuracion app.config


  Estimados.
  Gracias por su respuesta. El tema es que estoy utilizando VS2003 y la clase 
ConfigurationManager no existe.
  Alguna otra idea? tal vez leyendo desde un xml?
  Gracias.
  Federico Lazarte


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

  > From: [EMAIL PROTECTED]
  > To: [email protected]
  > Subject: [puntonet] DLL con archivo de configuracion app.config
  > Date: Wed, 28 Feb 2007 10:06:54 -0800
  > 
  > Hola Federico ...
  > 
  > Yo tebgo algo parecido en el Web.Config, me explico:
  > 
  > <appSettings>
  > 
  > <add key="elemento" value="bla bla bla"/>
  > 
  > </appSettings>
  > 
  > Y con una clase en el AppCode para leer del fichero de configuracion a 
  > traves de properties lo resuelvo :
  > 
  > public static string Elemento
  > 
  > {
  > 
  > get
  > 
  > {
  > 
  > try
  > 
  > {
  > 
  > return (string)ConfigurationManager.AppSettings["elemento"];
  > 
  > }
  > 
  > catch (Exception)
  > 
  > {
  > 
  > return String.Empty;
  > 
  > }
  > 
  > }
  > 
  > }
  > 
  > No olvides adicionar System.Configuration;
  > 
  > Espero resuelvas ...
  > 
  > ---
  > Agustin Galloso Viera
  > [EMAIL PROTECTED] 
  > 
  > 
  > 



------------------------------------------------------------------------------
  Llama a tus amigos de PC a PC: ¡Es GRATIS! Pruébalo 

Responder a