configuration file

G

Guest

Hi there,

I have a GUI project that always has worked fine. Till recently we used
Com+, now we use .Net remoting instead. We use a configuration file, named
"ClientRemoting.config". This is placed in the same directory of the
excecutable (Debug or Release). The project include also some UserControls
(which must use the configuration file, maybe even while creating an
instance). I want to use these UserControls in the same project. When I
create a new form and want to add a UserControl the following exception
occures:

An exception occurred while trying to create an instance of
FarmLine.GUI.FCentral.Controls.AlarmPopUp. The exception was ".Config file
C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE\ClientRemoting.config can not be read successfully due to
exception System.IO.FileNotFoundException: The system cannot find the file
specified.
at System.IConfigHelper.Run(IConfigHandler factory, String fileName)
at System.ConfigTreeParser.Parse(String fileName, String configPath,
Boolean skipSecurityStuff)
at
System.Runtime.Remoting.Activation.RemotingXmlConfigFileParser.ParseConfigFile(String filename)
at
System.Runtime.Remoting.RemotingConfigHandler.LoadConfigurationFromXmlFile(String filename).".

So the configuration file is searched in the directory "Microsoft Visual
Studio .NET 2003\Common7\IDE"??

I can't solve this problem, can anybody help me?

thanks,
Koert
 
G

Guest

it's a windows forms project, so no asp .net. I think I have found the
problem. In the constructor there is some initialization code which uses the
redirected dll. Because it's loaded in the IDE he starts searching for it in
the IDE directory. I'm now changing the code so that the initialization is
not executed during design time (unfortunately the DesingMode property for
controls does not work in constructors so I have to change all 21 controls in
my project...)

Maybe there is a faster way?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top