[GH-ISSUE #42] Unable to load configuration #27

Closed
opened 2026-02-26 10:35:18 +03:00 by kerem · 1 comment
Owner

Originally created by @wchao on GitHub (Jun 8, 2014).
Original GitHub issue: https://github.com/Pro/dkim-exchange/issues/42

After installing DkimSigner, I can't start the MSExchangeTransport service because the factory for DkimSigner aborts due to inability to load configuration. See below for the errors.

Error #1:

Failed to create agent factory for the agent 'Exchange DkimSigner' with error 'Failed to create type 'Exchange.DkimSigner.DkimSigningRoutingAgentFactory' from assembly 'C:\Program Files\Exchange DkimSigner\ExchangeDkimSigner.dll' due to error 'The configuration for Exchange Dkim Agent is not defined.'.'. Please verify the corresponding transport agent assembly and dependencies with correct version are installed.

Error #2:

Microsoft Exchange couldn't start transport agents. The Microsoft Exchange Transport service will be stopped. Exception details: Failed to create type 'Exchange.DkimSigner.DkimSigningRoutingAgentFactory' from assembly 'C:\Program Files\Exchange DkimSigner\ExchangeDkimSigner.dll' due to error 'The configuration for Exchange Dkim Agent is not defined.'. : Microsoft.Exchange.Data.ExchangeConfigurationException: Failed to create type 'Exchange.DkimSigner.DkimSigningRoutingAgentFactory' from assembly 'C:\Program Files\Exchange DkimSigner\ExchangeDkimSigner.dll' due to error 'The configuration for Exchange Dkim Agent is not defined.'. ---> System.Configuration.ConfigurationErrorsException: The configuration for Exchange Dkim Agent is not defined.
at Exchange.DkimSigner.DkimSigningRoutingAgentFactory.Initialize() in c:\Users\Alexandre\Documents\GitHub\dkim-exchange\Src\Exchange.DkimSigner\DkimSigningRoutingAgentFactory.cs:line 133
--- End of inner exception stack trace ---
at Microsoft.Exchange.Data.Transport.Internal.MExRuntime.FactoryTable.CreateAgentFactory(AgentInfo agentInfo)
at Microsoft.Exchange.Data.Transport.Internal.MExRuntime.FactoryTable..ctor(IEnumerable agents)
at Microsoft.Exchange.Data.Transport.Internal.MExRuntime.RuntimeSettings..ctor(MExConfiguration config, String agentGroup)
at Microsoft.Exchange.Data.Transport.Internal.MExRuntime.MExRuntime.Initialize(String configFile, String agentGroup, Boolean isBridgeHead, String installPath)
at Microsoft.Exchange.Transport.Categorizer.MExEvents.Initialize(String configFilePath)
at Microsoft.Exchange.Transport.Components.CategorizerMExRuntimeLoader.Load()

After I ran install, here are the files under C:\Program Files\Exchange DkimSigner:
ExchangeDkimSigner.dll
ExchangeDkimSigner.dll.config
ExchangeDkimSigner.pdf

I unblocked all three files. I also edited ExchangeDkimSigner.dll.config to appear as follows:

In addition, I created a subdirectory named "keys" and placed my private key under that subdirectory.

Any ideas why the factory is failing to load the config?

Originally created by @wchao on GitHub (Jun 8, 2014). Original GitHub issue: https://github.com/Pro/dkim-exchange/issues/42 After installing DkimSigner, I can't start the MSExchangeTransport service because the factory for DkimSigner aborts due to inability to load configuration. See below for the errors. Error #1: Failed to create agent factory for the agent 'Exchange DkimSigner' with error 'Failed to create type 'Exchange.DkimSigner.DkimSigningRoutingAgentFactory' from assembly 'C:\Program Files\Exchange DkimSigner\ExchangeDkimSigner.dll' due to error 'The configuration for Exchange Dkim Agent is not defined.'.'. Please verify the corresponding transport agent assembly and dependencies with correct version are installed. Error #2: Microsoft Exchange couldn't start transport agents. The Microsoft Exchange Transport service will be stopped. Exception details: Failed to create type 'Exchange.DkimSigner.DkimSigningRoutingAgentFactory' from assembly 'C:\Program Files\Exchange DkimSigner\ExchangeDkimSigner.dll' due to error 'The configuration for Exchange Dkim Agent is not defined.'. : Microsoft.Exchange.Data.ExchangeConfigurationException: Failed to create type 'Exchange.DkimSigner.DkimSigningRoutingAgentFactory' from assembly 'C:\Program Files\Exchange DkimSigner\ExchangeDkimSigner.dll' due to error 'The configuration for Exchange Dkim Agent is not defined.'. ---> System.Configuration.ConfigurationErrorsException: The configuration for Exchange Dkim Agent is not defined. at Exchange.DkimSigner.DkimSigningRoutingAgentFactory.Initialize() in c:\Users\Alexandre\Documents\GitHub\dkim-exchange\Src\Exchange.DkimSigner\DkimSigningRoutingAgentFactory.cs:line 133 --- End of inner exception stack trace --- at Microsoft.Exchange.Data.Transport.Internal.MExRuntime.FactoryTable.CreateAgentFactory(AgentInfo agentInfo) at Microsoft.Exchange.Data.Transport.Internal.MExRuntime.FactoryTable..ctor(IEnumerable agents) at Microsoft.Exchange.Data.Transport.Internal.MExRuntime.RuntimeSettings..ctor(MExConfiguration config, String agentGroup) at Microsoft.Exchange.Data.Transport.Internal.MExRuntime.MExRuntime.Initialize(String configFile, String agentGroup, Boolean isBridgeHead, String installPath) at Microsoft.Exchange.Transport.Categorizer.MExEvents.Initialize(String configFilePath) at Microsoft.Exchange.Transport.Components.CategorizerMExRuntimeLoader.Load() After I ran install, here are the files under C:\Program Files\Exchange DkimSigner: ExchangeDkimSigner.dll ExchangeDkimSigner.dll.config ExchangeDkimSigner.pdf I unblocked all three files. I also edited ExchangeDkimSigner.dll.config to appear as follows: <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" /> </startup> <domainSection> <Domains> <Domain Domain="mydomain.com" Selector="default" PrivateKeyFile="keys/mydomain.com.private" /> </Domains> </domainSection> <customSection> <general LogLevel="3" HeadersToSign="From; Subject; To; Date; Message-ID;" Algorithm="RsaSha1" HeaderCanonicalization="Simple" BodyCanonicalization="Simple" /> </customSection> </configuration> In addition, I created a subdirectory named "keys" and placed my private key under that subdirectory. Any ideas why the factory is failing to load the config?
kerem closed this issue 2026-02-26 10:35:18 +03:00
Author
Owner

@wchao commented on GitHub (Jun 8, 2014):

Never mind. I realized I was using the master version instead of 1.8.3. When I downloaded 1.8.3, it worked fine.

<!-- gh-comment-id:45451068 --> @wchao commented on GitHub (Jun 8, 2014): Never mind. I realized I was using the master version instead of 1.8.3. When I downloaded 1.8.3, it worked fine.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dkim-exchange-Pro#27
No description provided.