473,406 Members | 2,352 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,406 software developers and data experts.

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 1785

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
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
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
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,...
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
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...
0
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...

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.