Wednesday, November 09, 2005

Remoting Configuration

When using .Net Remoting and configuring system through configuration file, you usually will find code like this:

RemotingConfiguration.Configure("validate.config");

but if you dont want to hard code the name of the configuration file and want to use the default config file of your application. How you can achieve this. Well it caused me a lot of time to find it but finally it is really easy. Simply use the following code:

RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);

No comments: