471,334 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,334 software developers and data experts.

ClickOnce, ApplicationDeployment & AppDomains

Hi,

I'm writing a client app, the app creates a new AppDomain on startup so that
when we switch logins we just create new AppDomains.

I'm trying to publish it as a ClickOnce application. It's all deployed and
running (kind of) - but I need to test the
ApplicationDeployment.IsNetworkDeployed property.

If I attempt to read this property in the startup code - it's fine
If I attempt to read this property in the new app domain - it fails. Look
like the ApplicationDeployment information has not been copied over into the
new app domain.

So my question is...How do I make the ApplicationDeployment information
available in the new App Domain.

I create the new App Domain like so:

AppDomainSetup domainSetup = new AppDomainSetup();
domainSetup.LoaderOptimization = LoaderOptimization.MultiDomain;
domainSetup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;
domainSetup.ApplicationTrust = AppDomain.CurrentDomain.ApplicationTrust;

Evidence baseEvidence = AppDomain.CurrentDomain.Evidence;
Evidence evidence = new Evidence(baseEvidence);

AppDomain ad = AppDomain.CreateDomain("myclient", evidence, domainSetup);

Cheers,
Huw
Aug 1 '08 #1
0 1643

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Danny Tuppeny | last post: by
1 post views Thread by cathywigzell | last post: by
6 posts views Thread by Anders Elmén | last post: by
reply views Thread by Etienne | last post: by
1 post views Thread by M O J O | last post: by
reply views Thread by =?Utf-8?B?QWxiZXJ0byBDYXJkb3Nv?= | last post: by
3 posts views Thread by Peter Wyss | last post: by
reply views Thread by Peter Carlson | last post: by
3 posts views Thread by =?Utf-8?B?QXR1bCBSYW5l?= | last post: by
reply views Thread by rosydwin | last post: by

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.