We get an odd error in our custom configuration test environment.
This is for a Windows service running on a 64-bit Enterprise Server 2008 R2 with SQL Server 2008 in both test environments.
This section sets up our shared code library to send email to interested parties whenever an error is processed and published with this code:
catch(Exception ex) { ExceptionManager.Publish(ex); }
Specific errors (full details - names changed to save the innocent)
4 <configSections> 5 <section name="exceptionManagement" 6 type="Company.Shared.ExceptionManagement.ExceptionManagerSectionHandler, Company.Shared" /> 7 </configSections> 8 <exceptionManagement> 9 <publisher assembly="Company.Shared" type="Company.Shared.ExceptionManagement.DefaultPublisher" 10 logName="CPODSOracleDataExchange" applicationName="CPODSOracleDataExchange Service" /> 11 <publisher assembly="Company.Shared" type="Company.Shared.ExceptionManagement.ExceptionManagerSMTPPublisher" 12 from=" CPODSOracleDataExchangeService@Company.com " 13 defaultRecipients=" dev1@Company.com , dev2@Company.com " 14 applicationName="CPODSOracleDataExchange Service" /> 15 </exceptionManagement> 1) Exception Information ********************************************* Exception Type: System.Configuration.ConfigurationErrorsException Message: An error occurred creating the configuration section handler for exceptionManagement: Request failed. (E:\CITApps\Services\CPODS.OracleDataExchangeService\Company.CPODS.OracleDataExchangeService.exe.Config line 5) BareMessage: An error occurred creating the configuration section handler for exceptionManagement: Request failed. Filename: E:\CITApps\Services\CPODS.OracleDataExchangeService\Company.CPODS.OracleDataExchangeService.exe.Config Line: 5 Errors: System.Configuration.ConfigurationException[] Data: System.Collections.ListDictionaryInternal TargetSite: System.Configuration.FactoryRecord FindAndEnsureFactoryRecord(System.String, Boolean ByRef) HelpLink: NULL Source: System.Configuration StackTrace Information ********************************************* at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey) at Company.Shared.ExceptionManagement.ExceptionManager.Publish(Exception exception, NameValueCollection additionalInfo) 2) Exception Information ********************************************* Exception Type: System.Security.SecurityException Action: Demand PermissionType: System.Security.PermissionSet FirstPermissionThatFailed: NULL PermissionState: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/> Demanded: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/> GrantedSet: RefusedSet: DenySetInstance: NULL PermitOnlySetInstance: <PermissionSet class="System.Security.PermissionSet" version="1"> <IPermission class="System.Security.Permissions.FileDialogPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Access="Open"/> <IPermission class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Allowed="ApplicationIsolationByUser" UserQuota="1024000"/> <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Execution"/> <IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Window="SafeTopLevelWindows" Clipboard="OwnClipboard"/> <IPermission class="System.Drawing.Printing.PrintingPermission, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" version="1" Level="SafePrinting"/> <IPermission class="System.Security.Permissions.MediaPermission, WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" version="1" Audio="SafeAudio" Video="SafeVideo" Image="SafeImage"/> <IPermission class="System.Security.Permissions.WebBrowserPermission, WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" version="1" Level="Safe"/> </PermissionSet> FailedAssemblyInfo: NULL Method: Void InitWithRestrictedPermissions(System.Configuration.RuntimeConfigurationRecord, System.Configuration.FactoryRecord) Zone: NoZone Url: Message: Request failed. Data: System.Collections.ListDictionaryInternal TargetSite: System.Object CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef) HelpLink: NULL Source: mscorlib StackTrace Information ********************************************* at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Configuration.TypeUtil.CreateInstanceWithReflectionPermission(Type type) at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord) at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord) at System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord) at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
Corresponding section of the configuration file (with line numbers):
4 <configSections> 5 <section name="exceptionManagement" 6 type="Company.Shared.ExceptionManagement.ExceptionManagerSectionHandler, Company.Shared" /> 7 </configSections> 8 <exceptionManagement> 9 <publisher assembly="Company.Shared" type="Company.Shared.ExceptionManagement.DefaultPublisher" 10 logName="CPODSOracleDataExchange" applicationName="CPODSOracleDataExchange Service" /> 11 <publisher assembly="Company.Shared" type="Company.Shared.ExceptionManagement.ExceptionManagerSMTPPublisher" 12 from=" CPODSOracleDataExchangeService@Company.com " 13 defaultRecipients=" dev1@Company.com , dev2@Company.com " 14 applicationName="CPODSOracleDataExchange Service" /> 15 </exceptionManagement>
This exact same configuration works great in our DEV environment. These are the most accurate environments, as far as I know, and both services work under the same code base.
Any ideas on what a waiver is? One thing we're working on is creating a custom journal, but even when we delete the default publisher that tries to write to our own journal that doesn't exist, the process still doesn't work.