New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppDomain configuration #131

Open
chriseldredge opened this Issue May 1, 2014 · 6 comments

Comments

Projects
None yet
3 participants
@chriseldredge
Copy link

chriseldredge commented May 1, 2014

Is there a way to customize the configuration that is provided when my assembly is loaded? It would be nice if MyAssembly.dll.config was used when code in my assembly is executed.

This would allow appSettings, bindingRedirects and such to apply.

@chriseldredge

This comment has been minimized.

Copy link

chriseldredge commented May 1, 2014

A work-around on .net is to copy node.exe to a non-global location, then copy App.config to node.exe.config in this location.

@tjanczuk

This comment has been minimized.

Copy link
Owner

tjanczuk commented May 1, 2014

Edge runs all CLR code in a single app domain which uses a single configuration file (node.exe.config). This is the same model you get with standalone managed executables.

Since Edge can load multiple CLR assemblies into the single app domain (just like a standalone managed exe does), there would be no way to generically reconcile per-assembly configuration files.

One workaround is to store your settings in node.exe.config and make a copy of it when necessary. Another is to manually load arbitrary configuration file within your CLR code using System.Configuration classes.

@chriseldredge

This comment has been minimized.

Copy link

chriseldredge commented May 1, 2014

Yeah, using node.exe.config and a local copy of node.exe definitely works. I understand the difficulty in making this work magically, but it would allow OWIN self-hosted apps to behave intuitively when integrated with Node.

@tjanczuk

This comment has been minimized.

Copy link
Owner

tjanczuk commented May 1, 2014

One thing that could be done I think is to load the single configuration file form, say server.js.config, where server.js is the entry point to the Node application.

@chriseldredge

This comment has been minimized.

Copy link

chriseldredge commented Jul 21, 2014

Any advice on how to use server.js.config instead of node.exe.config? I'm willing to try implementing this but not sure where to start.

@derjust

This comment has been minimized.

Copy link

derjust commented Nov 4, 2014

I'd also like to increase the priority of this item.
Having multiple applications with C#/Entity Framework makes maintaining a single node.exe.config quite complicated.
Any idea how to get started on this? I think @chriseldredge and myself are happy to look into this having some kind of starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment