[GH-ISSUE #8] "Exchange.DkimSigner.DkimSigningRoutingAgentFactory" doesn't exist. #9

Closed
opened 2026-02-26 10:35:11 +03:00 by kerem · 20 comments
Owner

Originally created by @billsey on GitHub (Nov 7, 2013).
Original GitHub issue: https://github.com/Pro/dkim-exchange/issues/8

I get this error when trying to execute the first command in Exchange Management Shell. What step have I missed?

[PS] C:\Windows\system32>Install-TransportAgent -Name "Exchange DKIM" -TransportAgentFactory "Exchange.DkimSigner.DkimSi
gningRoutingAgentFactory" -AssemblyPath "C:\Program Files\Exchange-DKIM\Exchange.DkimSigner.dll"
The TransportAgentFactory type "Exchange.DkimSigner.DkimSigningRoutingAgentFactory" doesn't exist. The TransportAgentFa
ctory type must be the Microsoft .NET class type of the transport agent factory.
Parameter name: TransportAgentFactory
+ CategoryInfo : InvalidArgument: (:) [Install-TransportAgent], ArgumentException
+ FullyQualifiedErrorId : 777A2C6B,Microsoft.Exchange.Management.AgentTasks.InstallTransportAgent

Originally created by @billsey on GitHub (Nov 7, 2013). Original GitHub issue: https://github.com/Pro/dkim-exchange/issues/8 I get this error when trying to execute the first command in Exchange Management Shell. What step have I missed? [PS] C:\Windows\system32>Install-TransportAgent -Name "Exchange DKIM" -TransportAgentFactory "Exchange.DkimSigner.DkimSi gningRoutingAgentFactory" -AssemblyPath "C:\Program Files\Exchange-DKIM\Exchange.DkimSigner.dll" The TransportAgentFactory type "Exchange.DkimSigner.DkimSigningRoutingAgentFactory" doesn't exist. The TransportAgentFa ctory type must be the Microsoft .NET class type of the transport agent factory. Parameter name: TransportAgentFactory + CategoryInfo : InvalidArgument: (:) [Install-TransportAgent], ArgumentException + FullyQualifiedErrorId : 777A2C6B,Microsoft.Exchange.Management.AgentTasks.InstallTransportAgent
kerem 2026-02-26 10:35:11 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@Pro commented on GitHub (Nov 7, 2013):

Did you follow the installation steps?
This error message looks like the Applet 'Install-TransportAgent' can't find the Exchange.DkimSigner.dll

Make sure that the file is exactly in this path: C:\Program Files\Exchange-DKIM\Exchange.DkimSigner.dll
Also make sure that you downloaded the Raw version of the dll file:
Open this page:
https://github.com/Pro/dkim-exchange/blob/master/Release/Exchange%202010/Exchange.DkimSigner.dll
Then right click on the top right on "raw" and then "Save file as"

<!-- gh-comment-id:27992944 --> @Pro commented on GitHub (Nov 7, 2013): Did you follow the installation steps? This error message looks like the Applet 'Install-TransportAgent' can't find the Exchange.DkimSigner.dll Make sure that the file is exactly in this path: C:\Program Files\Exchange-DKIM\Exchange.DkimSigner.dll Also make sure that you downloaded the Raw version of the dll file: Open this page: https://github.com/Pro/dkim-exchange/blob/master/Release/Exchange%202010/Exchange.DkimSigner.dll Then right click on the top right on "raw" and then "Save file as"
Author
Owner

@Pro commented on GitHub (Nov 7, 2013):

Also have a look at issue #3

<!-- gh-comment-id:27993443 --> @Pro commented on GitHub (Nov 7, 2013): Also have a look at issue #3
Author
Owner

@billsey commented on GitHub (Nov 7, 2013):

I pulled the full archive using TortoiseGit. I copied the Release folder to C:\Program Files\Exchange-DKIM. I copied Exchange.DkimSigner.dll from the Exchange 2010 folder up to sit in the same folder as the config file. That last part wasn't in the instructions, but it seemed obvious to me...

<!-- gh-comment-id:27993811 --> @billsey commented on GitHub (Nov 7, 2013): I pulled the full archive using TortoiseGit. I copied the Release folder to C:\Program Files\Exchange-DKIM. I copied Exchange.DkimSigner.dll from the Exchange 2010 folder up to sit in the same folder as the config file. That last part wasn't in the instructions, but it seemed obvious to me...
Author
Owner

@billsey commented on GitHub (Nov 7, 2013):

Could be a .NET framework issue. Which version is required? The server has 4.5 installed, but doesn't have earlier ones...

<!-- gh-comment-id:27994066 --> @billsey commented on GitHub (Nov 7, 2013): Could be a .NET framework issue. Which version is required? The server has 4.5 installed, but doesn't have earlier ones...
Author
Owner

@Pro commented on GitHub (Nov 7, 2013):

The .dll is compiled for .NET 3.5. If you have 4.5 installed it should work because newer ones provide back-compatibility for older ones.
You can try to install 3.5, maybe this fixes the error.

Another thing you can try: Execute the Install-TransportAgent directly in "Exchange-DKIM" folder as working directory.

<!-- gh-comment-id:27999368 --> @Pro commented on GitHub (Nov 7, 2013): The .dll is compiled for .NET 3.5. If you have 4.5 installed it should work because newer ones provide back-compatibility for older ones. You can try to install 3.5, maybe this fixes the error. Another thing you can try: Execute the Install-TransportAgent directly in "Exchange-DKIM" folder as working directory.
Author
Owner

@Pro commented on GitHub (Nov 7, 2013):

Please also try to add the Exchange-DKIM folder to your PATH environment variable:

set "path=%path%;C:\Program Files\Exchange-DKIM"

Please double check the folder name in your script calls: in the instructions the folder name doesn't contain a dash, it's "Exchange DKIM"

<!-- gh-comment-id:28000267 --> @Pro commented on GitHub (Nov 7, 2013): Please also try to add the Exchange-DKIM folder to your PATH environment variable: ``` set "path=%path%;C:\Program Files\Exchange-DKIM" ``` Please double check the folder name in your script calls: in the instructions the folder name doesn't contain a dash, it's "Exchange DKIM"
Author
Owner

@Pro commented on GitHub (Nov 7, 2013):

I updated the Readme. See step 3 for the environment variable setup.

<!-- gh-comment-id:28000997 --> @Pro commented on GitHub (Nov 7, 2013): I updated the Readme. See step 3 for the environment variable setup.
Author
Owner

@billsey commented on GitHub (Nov 7, 2013):

Tried both with no change... :-(

<!-- gh-comment-id:28001235 --> @billsey commented on GitHub (Nov 7, 2013): Tried both with no change... :-(
Author
Owner

@Pro commented on GitHub (Nov 7, 2013):

I've seen that the instructions step 1 was a bit unclear and for an older version. I updated this one too.
Make sure that the folder structure is (the .dll mustn't be in a subfolder):

C:\Program Files\Exchange DKIM\Exchange.DkimSigner.dll
C:\Program Files\Exchange DKIM\Exchange.DkimSigner.dll.config
<!-- gh-comment-id:28001463 --> @Pro commented on GitHub (Nov 7, 2013): I've seen that the instructions step 1 was a bit unclear and for an older version. I updated this one too. Make sure that the folder structure is (the .dll mustn't be in a subfolder): <pre> C:\Program Files\Exchange DKIM\Exchange.DkimSigner.dll C:\Program Files\Exchange DKIM\Exchange.DkimSigner.dll.config </pre>
Author
Owner

@Pro commented on GitHub (Nov 7, 2013):

I've found this: http://blogs.msdn.com/b/akashb/archive/2010/11/19/getting-an-error-when-trying-to-install-a-transport-agent-that-is-built-with-exchange-2010-pre-sp-1-binaries-on-exchange-2010-sp-1.aspx

Which Exchange Server version do you use exactly (which Service Pack)?

<!-- gh-comment-id:28001757 --> @Pro commented on GitHub (Nov 7, 2013): I've found this: http://blogs.msdn.com/b/akashb/archive/2010/11/19/getting-an-error-when-trying-to-install-a-transport-agent-that-is-built-with-exchange-2010-pre-sp-1-binaries-on-exchange-2010-sp-1.aspx Which Exchange Server version do you use exactly (which Service Pack)?
Author
Owner

@Pro commented on GitHub (Nov 7, 2013):

I think the error is because of a different Service Pack version: #5

If you use a different SP than SP3 please upload all the files from this directory and post a link here:

C:\Program Files\Microsoft\Exchange Server\V14\Public
Microsoft.Exchange.Data.Common.dll
Microsoft.Exchange.Data.Common.xml
Microsoft.Exchange.Data.Transport.dll
Microsoft.Exchange.Data.Transport.xml
<!-- gh-comment-id:28003179 --> @Pro commented on GitHub (Nov 7, 2013): I think the error is because of a different Service Pack version: #5 If you use a different SP than SP3 please upload all the files from this directory and post a link here: <pre> C:\Program Files\Microsoft\Exchange Server\V14\Public Microsoft.Exchange.Data.Common.dll Microsoft.Exchange.Data.Common.xml Microsoft.Exchange.Data.Transport.dll Microsoft.Exchange.Data.Transport.xml </pre>
Author
Owner

@billsey commented on GitHub (Nov 7, 2013):

Version 14.0 (Build 639.21), so you are right. I apparently don't have any of the service packs installed. :-(

I'm downloading sp3 right now...

Bill

<!-- gh-comment-id:28007336 --> @billsey commented on GitHub (Nov 7, 2013): Version 14.0 (Build 639.21), so you are right. I apparently don't have any of the service packs installed. :-( I'm downloading sp3 right now... Bill
Author
Owner

@billsey commented on GitHub (Nov 8, 2013):

OK, sp3 upgrade finished and it worked! Thanks.

BTW, I like the upgraded instruction on GitHub! Though I do have one question regarding keys. I create the private key file and place it in a keys directory, then put the domain name, selector and location of that file into the config. Where do I put the public key so it’ll get used appropriately?

I’m just about at the test stage, I think. ☺

<!-- gh-comment-id:28033918 --> @billsey commented on GitHub (Nov 8, 2013): OK, sp3 upgrade finished and it worked! Thanks. BTW, I like the upgraded instruction on GitHub! Though I do have one question regarding keys. I create the private key file and place it in a keys directory, then put the domain name, selector and location of that file into the config. Where do I put the public key so it’ll get used appropriately? I’m just about at the test stage, I think. ☺
Author
Owner

@billsey commented on GitHub (Nov 8, 2013):

Looks like I’m getting closer… I’ve got the private key stored with the text from the DKIM Wizard, including the -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY----- lines. Do I need to convert the PEM style file to a DER file somehow?

The description for Event ID 0 from source Exchange DKIM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Couldn't load config: System.ArgumentException: The encoded key is not in the proper DER format.
Parameter name: encodedKey ---> System.Security.Cryptography.CryptographicException: Bad Data.

at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)
at System.Security.Cryptography.Utils._ImportKey(SafeProvHandle hCSP, Int32 keyNumber, CspProviderFlags flags, Object cspObject, SafeKeyHandle& hKey)
at System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters)
at Exchange.DkimSigner.CryptHelper.GetProviderFromDerEncodedRsaPrivateKey(Byte[] encodedKey)
--- End of inner exception stack trace ---
at Exchange.DkimSigner.CryptHelper.GetProviderFromDerEncodedRsaPrivateKey(Byte[] encodedKey)
at Exchange.DkimSigner.DkimSigningRoutingAgentFactory.Initialize()

the message resource is present but the message is not found in the string/message table

<!-- gh-comment-id:28035940 --> @billsey commented on GitHub (Nov 8, 2013): Looks like I’m getting closer… I’ve got the private key stored with the text from the DKIM Wizard, including the -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY----- lines. Do I need to convert the PEM style file to a DER file somehow? The description for Event ID 0 from source Exchange DKIM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: Couldn't load config: System.ArgumentException: The encoded key is not in the proper DER format. Parameter name: encodedKey ---> System.Security.Cryptography.CryptographicException: Bad Data. at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) at System.Security.Cryptography.Utils._ImportKey(SafeProvHandle hCSP, Int32 keyNumber, CspProviderFlags flags, Object cspObject, SafeKeyHandle& hKey) at System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters) at Exchange.DkimSigner.CryptHelper.GetProviderFromDerEncodedRsaPrivateKey(Byte[] encodedKey) --- End of inner exception stack trace --- at Exchange.DkimSigner.CryptHelper.GetProviderFromDerEncodedRsaPrivateKey(Byte[] encodedKey) at Exchange.DkimSigner.DkimSigningRoutingAgentFactory.Initialize() the message resource is present but the message is not found in the string/message table
Author
Owner

@Pro commented on GitHub (Nov 8, 2013):

The public key doesn't need to be stored at a specific location. You need to set it up in your domain settings/domain hoster.

<!-- gh-comment-id:28038347 --> @Pro commented on GitHub (Nov 8, 2013): The public key doesn't need to be stored at a specific location. You need to set it up in your domain settings/domain hoster.
Author
Owner

@billsey commented on GitHub (Nov 8, 2013):

Looks like I can do the conversion with OpenSSL. But that’s a task for tomorrow. :) Thanks for all the help today. I feel like I’m getting really close.

<!-- gh-comment-id:28040465 --> @billsey commented on GitHub (Nov 8, 2013): Looks like I can do the conversion with OpenSSL. But that’s a task for tomorrow. :) Thanks for all the help today. I feel like I’m getting really close.
Author
Owner

@billsey commented on GitHub (Nov 9, 2013):

And tomorrow rolled around with openssl complaining it couldn't load the key for conversion. Do you know the command line I should use? I'm not finding the right command online. If I need to I'll install a virtual linux image, but I'll need the command to use there as well.

<!-- gh-comment-id:28134769 --> @billsey commented on GitHub (Nov 9, 2013): And tomorrow rolled around with openssl complaining it couldn't load the key for conversion. Do you know the command line I should use? I'm not finding the right command online. If I need to I'll install a virtual linux image, but I'll need the command to use there as well.
Author
Owner

@Pro commented on GitHub (Nov 9, 2013):

I've checked the code again and remembered that you can use PEM or DER format, thus both of them should work.
I think the exception is due to a invalid certificate file.
Please try to generate a certificate using this page for debugging:
http://www.port25.com/support/domainkeysdkim-wizard/

<!-- gh-comment-id:28135038 --> @Pro commented on GitHub (Nov 9, 2013): I've checked the code again and remembered that you can use PEM or DER format, thus both of them should work. I think the exception is due to a invalid certificate file. Please try to generate a certificate using this page for debugging: http://www.port25.com/support/domainkeysdkim-wizard/
Author
Owner

@Pro commented on GitHub (Nov 9, 2013):

Here are the commands to convert the keys if you want to try it anyways:

  • Convert a DER file (.crt .cer .der) to PEM

    openssl x509 -inform der -in certificate.cer -out certificate.pem

  • Convert a PEM file to DER

    openssl x509 -outform der -in certificate.pem -out certificate.der

Source: http://www.sslshopper.com/article-most-common-openssl-commands.html

<!-- gh-comment-id:28135094 --> @Pro commented on GitHub (Nov 9, 2013): Here are the commands to convert the keys if you want to try it anyways: - Convert a DER file (.crt .cer .der) to PEM `openssl x509 -inform der -in certificate.cer -out certificate.pem` - Convert a PEM file to DER `openssl x509 -outform der -in certificate.pem -out certificate.der` Source: http://www.sslshopper.com/article-most-common-openssl-commands.html
Author
Owner

@Pro commented on GitHub (Nov 26, 2013):

Today I commited a new install script. This should fix common install problems.
Simply follow the the instructions here: https://github.com/Pro/dkim-exchange#update-from-version-05 or install from scratch https://github.com/Pro/dkim-exchange#installing-the-transport-agent

<!-- gh-comment-id:29335170 --> @Pro commented on GitHub (Nov 26, 2013): Today I commited a new install script. This should fix common install problems. Simply follow the the instructions here: https://github.com/Pro/dkim-exchange#update-from-version-05 or install from scratch https://github.com/Pro/dkim-exchange#installing-the-transport-agent
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#9
No description provided.