I've arrived at having a .NET Remoting server and having my Proxy layer call into the server to talk to the back-end system.  I like defining the .NET Remoting configuration in a config file for both the server and the client -- this is working quite well.

This leaves my Proxy with very simple code like the following:

public class MyProxy
{
public static MyEntity GetByID(Guid ID)
{
RemotingConfiguration.Configure("Proxy.config", false);
MyManager manager = new MyManager();

return manager.GetByID(ID);
}
}

However, what I don't like is that I need to be able to read in the Proxy.config file from the executing assembly's folder, which means the Proxy.config file has to be part of the executing assembly's project.  I want my Proxy layer to have its own app.config file that gets built as Proxy.dll.config and then injected into the bin folder for any assembly that references the Proxy.


Anyone been able to pull this off?