Interesting App domain issue

A

Alvin Bruney [MVP]

I have two managed windows applications A and B. Both have their own config
files. Application A invokes application B thru process start. However,
since B runs in A's context, B starts up and reads A's configuration file
instead of it's own. I didn't even realize that this was possible.

To get around that issue, from A application code I create a new application
domain and load B. B then is able to read it's own configuration file.
However, it opens a console window while it executes. I want to suppress
this window. I also want to read the output from the console window; that
is, make application B's output be available in application A. This was
rather easy with the system.diagnostic class however because of the config
file issue, I can't use it. Any hints? Assume further that app B is a third
party component so I have no access to the source code.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
 
W

Willy Denoyette [MVP]

"Alvin Bruney [MVP]" <www.lulu.com/owc> wrote in message
|I have two managed windows applications A and B. Both have their own config
| files. Application A invokes application B thru process start. However,
| since B runs in A's context, B starts up and reads A's configuration file
| instead of it's own. I didn't even realize that this was possible.
|

This is not the expected behavior, and is not what I'm seeing when I start a
windows application using Process.Start (using V2's
ConfigurationManager.OpenExeConfiguration).

My test platform consists of the following:
Windows Application : A.exe
Config file: A.exe.Config

Windows Application : B.exe
Config file: B.exe.Config

A calls Process.Start("B.exe");

A uses A.exe.Config, while B uses B.exe.Config

Willy.
 
A

Alvin Bruney [MVP]

I need to get a sample from the developer that reproduces this problem so it
may be until monday before I post back. This is .NET 1.1 by the way.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
A

Alvin Bruney [MVP]

Let's put that one up to programmer error.
Thanks for the time willy.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Alvin Bruney said:
I need to get a sample from the developer that reproduces this problem so
it may be until monday before I post back. This is .NET 1.1 by the way.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Willy Denoyette said:
"Alvin Bruney [MVP]" <www.lulu.com/owc> wrote in message
|I have two managed windows applications A and B. Both have their own
config
| files. Application A invokes application B thru process start. However,
| since B runs in A's context, B starts up and reads A's configuration
file
| instead of it's own. I didn't even realize that this was possible.
|

This is not the expected behavior, and is not what I'm seeing when I
start a
windows application using Process.Start (using V2's
ConfigurationManager.OpenExeConfiguration).

My test platform consists of the following:
Windows Application : A.exe
Config file: A.exe.Config

Windows Application : B.exe
Config file: B.exe.Config

A calls Process.Start("B.exe");

A uses A.exe.Config, while B uses B.exe.Config

Willy.
 

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