2

Here is what I did: 1. Compiled a simple c# console application with a third party library and some configuration settings. (in appSettings of app.config) 2. Stand alone run worked perfectly. It loaded third party dll and read key values from appSettings. 3. I put them under \cgi directory and tried to access the exe from browser. 4. It invoked the exe but failed to load config file and third party dll eventhough all are there unde same dir \cgi

Please help.

System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] str)
   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
   at System.AppDomainSetup.VerifyDir(String dir, Boolean normalize)
   at System.AppDomainSetup.get_ConfigurationFile()
Srikanth P Vasist
  • 1,327
  • 2
  • 14
  • 26
  • A work around. Force config file http://stackoverflow.com/questions/4738/using-configurationmanager-to-load-config-from-an-arbitrary-location – Srikanth P Vasist Aug 05 '15 at 14:02

0 Answers0