473,763 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Configur ation.Install.I nstaller Issue

Hi,
I have a Installer class used to install my windows service, it was created
by the
wizard that is in the VS, I just whent into the properties and set up the
properties of the ServiceInstalle r member by using the properties windows.
But I choose the DinamicProperti es, the wizard created into the
"InitializeComp onents" two assignations of the ServiceInstalle r properties
by instanciating the System.Configur ation.AppSettin gsReader this properties
are in the app.config file.

ie.

private void InitializeCompo nent()
{

System.Configur ation.AppSettin gsReader configurationAp pSettings = new
System.Configur ation.AppSettin gsReader();
this.m_MonitorP rocInstaller = new
System.ServiceP rocess.ServiceP rocessInstaller ();
this.m_MonitorI nstaller = new System.ServiceP rocess.ServiceI nstaller();
//
// m_MonitorProcIn staller
//
this.m_MonitorI nstaller.StartT ype = ServiceStartMod e.Manual;
this.m_MonitorP rocInstaller.Ac count = ServiceAccount. LocalSystem;
//
// m_MonitorInstal ler
//
this.m_MonitorI nstaller.Displa yName =
((string)(confi gurationAppSett ings.GetValue(" key_DisplayName ",
typeof(string)) ));
this.m_MonitorI nstaller.Servic eName =
((string)(confi gurationAppSett ings.GetValue(" Key_ServiceName ",
typeof(string)) ));

}

But at the time run the installutil in order to install the service I got
some errors:

An exception occurred during the Install phase.
System.InvalidO perationExcepti on: Unable to create an instance of the
MonitorService. Installer.Monit orInstaller installer type.
The inner exception System.Reflecti on.TargetInvoca tionException was thrown
with
the following error message: Exception has been thrown by the target of an
invoc
ation..
The inner exception System.InvalidO perationExcepti on was thrown with the
followi
ng error message: The key 'key_DisplayNam e' does not exist in the
appSettings co
nfiguration section..

I when into the .config file after I compiled the solution and the key is
there.

Could any of you advice why I cannot read the .config file.

Cheers...
Nov 22 '05 #1
0 1832

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

Similar topics

1
2799
by: Peter Schmiedeskamp | last post by:
Hello, I'm writing in regard to the distutils package for python. I regularly repackage installers for silent/automated distribution on numerous Windows PCs throughout an enterprise. Sites such as AppDeploy (http://www.appdeploy.com) and tools such as WISE all suggest that this is a pretty common task. Increasingly, however, I've found that tools like WISE's setup capture are becoming less relevant for this task. Rather than running...
0
533
by: Erick | last post by:
Hi, I have a Installer class used to install my windows service, it was created by the wizard that is in the VS, I just whent into the properties and set up the properties of the ServiceInstaller member by using the properties windows. But I choose the DinamicProperties, the wizard created into the "InitializeComponents" two assignations of the ServiceInstaller properties by instanciating the System.Configuration.AppSettingsReader this...
4
342
by: TT (Tom Tempelaere) | last post by:
Hi there It is very strange, there is no namespace System.Configuration.Install in my C# version, and of course since the namespace isn't there, the Installer class isn't there either. Another thing is that my version doesn't recognize the attribute RunInstaller Specs: * Microsoft Dev. Env. 2003 / 7.1.308 * .NET Framework / 1.1.432 Thanks Tom.
0
2614
by: Pawel Janik | last post by:
Hello. I want to install new system service, but not using instalutil, but manualy, from my application. There is my code, that should do this: Installer installer = new Installer(); ServiceProcessInstaller spi = new ServiceProcessInstaller(); spi.Account = ServiceAccount.User; ServiceInstaller si = new ServiceInstaller();
7
5021
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
2
3226
by: John Chrisman | last post by:
I get the above error message as well as a complaint about the RunInstallerAttribute not being found when compiling the following code. This couldn't be any simpler and I see examples on the web that use this namespace and this attribute. I am using VS.Net 2003. Any ideas? using System; using System.ServiceProcess; using System.Configuration.Installer; namespace POP3Retriever
1
3899
by: Ashkan Daie | last post by:
Hi All, When trying to install a performance counter via InstallUtil I get the following exception: Creating performance counter category Enterprise Library Caching. An exception occurred during the Install phase. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was
0
807
by: Andy Baker | last post by:
I have a VB.NET 2003 application that I need the user to be able to configure after installation, before running it. I am using the installer than comes with VS.NET and have added an installer to my solution, which works well and installs the application successfully. I have also added a configuration project to my solution, then in the Custom Actions section of the installer, under Install, I have added 'Primary Output from Configuration...
0
2316
by: JDeats | last post by:
I have a new Installer class (derived from System.Configuration.Install.Installer) and I have override methods for Install, Uninstall, Commit. The MSI builder tool I'm using is Advanced Installer, the resulting MSI successfully executes the code inside my Installer classe Install and Uninstall methods... My problem is distinguishing a patch from a fresh install and following a different execution path in my Installer class depending on...
0
10145
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.