Configuration File


?? (.config)




.Config on the Server

You must also deploy a configuration file if you want your solution to work when users are offline.
The first time remote code is run, the assembly and the configuration file is downloaded into the local cache.
When the user goes offline the solution continues to work because the cached assembly and configuration file are still available.
Using a configuration file it is very easy to change the assembly loading policy.


If there was no configuration file deployed to the server then the user would not download one into the local cache.
When the user does offine, the CLR cannot find a configuration file and so wont run ??


To add a configuration file to your project, right click the project in Solution Explorer and choose (Add > New Item > Application Configuration File).
Name the configuration file after the customisation assembly file name.
If your assembly is called MyExcelSolution.dll then call your configuration file MyExcelSolution.dll.config


The configuration file doesn't have to have any loading policies, for example:

/?xml version="1.0" encoding="utf-8" ?/ 
/configuration/
//configuration/

To ensure that this file gets copied to the server, make sure that the Build Action is set to Content in the Properties pane for the configuration file.



© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext