Microsoft .NET Framework allows to store a configuration file in the directory of the .NET executable or ASP.NET application that contains runtime-specific configurations. These configurations are loaded when the application is launched. For .NET executables the configuration file needs to be named with both the .exe file extension and the .config file extension. For example myprogramm.exe.config.
When running a test, the executable that hosts your .NET test driver code is perfrun.exe. Therefore it's possible to have a perfrun.exe.config that contains configuration settings that are loaded at startup. However this approach is not possible because Silk Performer generates the perfrun.exe.config file automatically before starting a test and would therefore overwrite such a configuration file. The perfrun.exe.config file contains settings based on the profile settings of the project profile.
With Silk Performer, you can have an app.config file in your project directory to specify your own configuration file settings. Silk Performer checks for this configuration file and merges the content into an automatically generated perfrun.exe.config file. To make the settings in the app.config file available to all agent machines, you need to add this file to the Data Files folder in the Project menu tree.
<configuration> <system.net> ... </system.net> <runtime> ... </runtime> </configuration>
For backward compatiblity, when Silk Performer locates an app.config file, the content is added after the runtime tag. That means that your app.config file can contain any configuration nodes that are allowed below the root configuration node, except the system.net and runtime nodes, because Silk Performer generates those nodes.
With Silk Performer you can provide a fully-configured app.config file with all possible configuration sections. Silk Performer adds the necessary entries for web-traffic routing in the generated perfrun.exe.config file.
<system.runtime.remoting> <application> <channels> <channel ref="http" port="2000" /> </channels> <client url="http://remoteserver:2000"> <activated type="RemoteDll.RemoteClass1, RemoteDll" /> <activated type="RemoteDll.RemoteClass2, RemoteDll" /> </client> </application> </system.runtime.remoting>