473,472 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

System.Configuration.Install.Installer 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 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 properties
are in the app.config file.

ie.

private void InitializeComponent()
{

System.Configuration.AppSettingsReader configurationAppSettings = new
System.Configuration.AppSettingsReader();
this.m_MonitorProcInstaller = new
System.ServiceProcess.ServiceProcessInstaller();
this.m_MonitorInstaller = new System.ServiceProcess.ServiceInstaller();
//
// m_MonitorProcInstaller
//
this.m_MonitorInstaller.StartType = ServiceStartMode.Manual;
this.m_MonitorProcInstaller.Account = ServiceAccount.LocalSystem;
//
// m_MonitorInstaller
//
this.m_MonitorInstaller.DisplayName =
((string)(configurationAppSettings.GetValue("key_D isplayName",
typeof(string))));
this.m_MonitorInstaller.ServiceName =
((string)(configurationAppSettings.GetValue("Key_S erviceName",
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.InvalidOperationException: Unable to create an instance of the
MonitorService.Installer.MonitorInstaller installer type.
The inner exception System.Reflection.TargetInvocationException was thrown
with
the following error message: Exception has been thrown by the target of an
invoc
ation..
The inner exception System.InvalidOperationException was thrown with the
followi
ng error message: The key 'key_DisplayName' 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 1786

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

Similar topics

1
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...
0
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...
4
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...
0
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();...
7
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....
2
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...
1
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...
0
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...
0
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,...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
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.