Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9194867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:30:49+00:00 2026-06-17T21:30:49+00:00

I have created a console application that performs simple actions on the Tridion.AudienceManagement.API API.

  • 0

I have created a console application that performs simple actions on the Tridion.AudienceManagement.API API. When I start the application, the first thing it does is reference UserContext.Current, at which point I get the following exception.

The type initializer for 'Tridion.AudienceManagement.DomainModel.Utilities.Configuration' threw an exception.
at Tridion.AudienceManagement.DomainModel.Utilities.Configuration.get_LogFolder()
at Tridion.AudienceManagement.DomainModel.Utilities.Logger.AssertValidLogFolder()
at Tridion.AudienceManagement.DomainModel.Utilities.Logger.WriteLine(LogLevel logLevel, String message, Object[] objects)
at Tridion.AudienceManagement.DomainModel.ServiceClient.ContentManagerClient.LogBindingInfo(Exception ex)
at Tridion.AudienceManagement.DomainModel.ServiceClient.ContentManagerClient.GetConfiguredCoreService()
at Tridion.AudienceManagement.DomainModel.ServiceClient.ContentManagerClient.GetClient(UserContext userContext, UserData& userData)
at Tridion.AudienceManagement.DomainModel.ServiceClient.ContentManagerClient.LoadCurrentUser(UserContext userContext, String userDataXml)
at Tridion.AudienceManagement.DomainModel.UserContext..ctor(String trusteeName)
at Tridion.AudienceManagement.API.UserContext..ctor()
at Tridion.AudienceManagement.API.UserContext.get_Current()   

I have confirmed that Audience Manager is installed and working on the server.

By running the programme from a shell logged in as the MTS User, we can avoid this problem. At first we thought the issue was with file system permissions on the log folder, however, even granting full control does not help.

When comparing procmon output from running the code as the two users, we could see that the user for whom it failed was getting ACCESS DENIED for creating a file within C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys – the filename is a long string of random-looking characters. This ACCESS DENIED is not seen for MtsUser.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:30:50+00:00Added an answer on June 17, 2026 at 9:30 pm

    It appears that the user running the console application is not allowed to read the encryption key which was used to encrypt the configuration.

    You have a few options to solve it:

    1. Remove the encryption (not recommended)
    2. Run your tool as a user who does have permissions to use the key
      (i.e. MTSUser)
    3. Grant permissions to the user you want to run the tool. Example
      command-line: aspnet_regiis -pa "TridionRsaProtectedConfigurationProvider" "domain\username"

    (Which obviously needs to run as someone who can read the key — MTSUser)

    See the following URLs for more information:

    • Encrypting sensitive strings for Audience Manager (SDL LiveContent)
    • Walkthrough: Encrypting Configuration Information Using Protected Configuration (MSDN)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created a very simple console application in vb.net that emails me some
I have created a simple c# console application with .net framework 2.0 that uses
I have a console application that I have created in C#. I have specifically
I have created a borderless (and scrollbox-less) console application, but I have found that
I have created a Win32 Console Application in Visual Studio but when I start
I have a simple console application that runs calculations in several threads (10-20 of
I have created one C# console application. In that application, I have many namespaces.
I am new to visual studio.I have created a simple console application and then
I have a console application that is using code first Entity Framework 4.3.1. I
I have created a C# console application that contains the namespaces System and System.Data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.