473,388 Members | 1,524 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Error Saving Configuration

Hi all,

i have app.windows .NET that open an app.config from a Windows service for
modify values. The app.config of service uses EntLibrary Exceptionhandling
and Logging.

My code for modify app.config of service using my WinForms App:

Dim rutaConfig As String = Me.tbRutaConfigServicioBase.Text

'// Map to the application configuration file.
Dim configFile As ExeConfigurationFileMap = New ExeConfigurationFileMap()
configFile.ExeConfigFilename = rutaConfig
Dim config As Configuration =
ConfigurationManager.OpenMappedExeConfiguration(co nfigFile,
ConfigurationUserLevel.None)
Dim keys As String() = config.AppSettings.Settings.AllKeys

' Get the KeyValueConfigurationCollection
' from the configuration.
Dim settings1 As KeyValueConfigurationCollection = _
config.AppSettings.Settings()

settings1("GRUPOBACKUP.Ruta_Grabar_Ficheros").Valu e =
Me.tbGRUPOBACKUP_Ruta_Grabar_Ficheros.Text
settings1("SERVIDOR_INDEXADO").Value = Me.tbSERVIDOR_INDEXADO.Text

settings1("PDF_CREADOR").Value = Me.tbPDF_CREADOR.Text
settings1("PDF_AUTOR").Value = Me.tbPDF_AUTOR.Text
settings1("PDF_TITULO").Value = Me.tbPDF_TITULO.Text
settings1("PDF_ASUNTO").Value = Me.tbPDF_ASUNTO.Text

config.Save(ConfigurationSaveMode.Modified, True)

I get this error:

'System.Configuration.ConfigurationErrorsException was unhandled
' BareMessage = "Se ha producido un error al crear el controlador de
sección de configuración para exceptionHandling: No se puede cargar el
archivo o ensamblado
'Microsoft.Practices.EnterpriseLibrary.ExceptionHa ndling, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=null' ni una de sus dependencias. El sistema
no puede hallar el archivo especificado."
' Filename = "C:\Archivos de programa\GRUPO BACKUP\GRUPO BACKUP
Servicios Principales OGF\ServicioBase.exe.config"
'StackTrace:
Not load assembly 'Microsoft.Practices.EnterpriseLibrary.ExceptionHa ndling

Config.Save loads assemblies that appears in app.config ???

Any suggestions???

Thanks in advance
--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.com/churrosoft
http://www.setbb.com/putainformatica...opic.php?p=843
www.trabajobasura.com/solusoft

Sep 19 '08 #1
0 934

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sam Fisher | last post by:
Hi @all I'm really new to programming, so please dont' lose patience. Now, I'm writing a VB .net application in which (as in most apps) the user shall setup a configuration (via checkboxes etc.)....
1
by: Supra | last post by:
i got "system error" when saving to xml file. i am using checkbox1 control to xml. when user clicked checkbox and set to true and press btnOk to conform and save it to xml ...
0
by: Supra | last post by:
i got "system error" when saving to xml file. i am using checkbox1 control to xml. when user clicked checkbox and set to true and press btnOk to conform and save it to xml ...
3
by: Ed P. | last post by:
I am trying to save a location to a database using the registry...I've been successful in this, but is there another way I can save this. I have searched on the net and have found that saving the...
6
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
by: Mufasa | last post by:
Can anybody give me an opinion on which is more efficient - Saving parameters in a database that is on the same machine as the web site or Reading parameters from a .config file ? It seems...
1
by: WebCM | last post by:
We can do it in different ways. Configuration data are sent by POST. Some of them should be parsed before saving to file. Perhaps, I will use var_export(). However, how to do it best? 1....
0
by: jordonkraft | last post by:
Hello, I have been searching the net, MSDN, google groups and can't seem to find anything about what is happening to me. I have developed a application using VB.Net 2.0 and deploy it using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.