0

I've got an assembly, e.g. "DoCommonStuffAssembly", with its own app.config.

This assembly is referenced by two different assemblies, e.g. "BusinessLogic01" and "BusinessLogic02", with their own version of the configuration section of DoCommonStuffAssembly.

Now I need both BusinessLogic01 and BusinessLogic02 to be referenced in the same ASP.NET application, but both should have different versions of the configuration section of DoCommonStuffAssembly (like log folder or something like that).

How can I do this? Where do I have to make changes to make DoCommonStuffAssembly useful in an environment like this?

0

1 Answer 1

1

You cannot handle this scenario, unless the two BusinessLogic assemblies are referenced in different virtual paths. You can have a web.config in each path. If the two BusinessLogic assemblies were only referenced in different paths, then you could have one web.config with each set of settings.

At least, I think this would work.

Sign up to request clarification or add additional context in comments.

6 Comments

Thanks for your quick answer, if I understand what you said, I have to create two folders inside \bin like \bin\BusinessLogic01 and \bin\BusinessLogic02, move the Dlls to their respective folder including DoCommonStuffAssembly in both and create a web.config inside each of them with their own version of the configuration keys of DoCommonStuffAssembly. Is that correct? Does the main web.config in ASP.Net will load both web.config in those folders?
No, I meant if your site is at http://host/site, then create http://host/site/bus1 and http://host/site/bus2 and put a different web.config in each.
Ok, but, how can I create an instance of Businnes01 and Businnes02 assembly classes from host/site ?
You wouldn't. You would put all code that uses Business01 under hosts/site/business01.
But I need to create instances of Business01 and Business02 with their own configuration keys sets from the main ASP.Net app, I couldn't do that
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.