After commerce server installation, if we try to create and schedule a direct mailer, commerce server throws an error -”Direct mail <mailer id> could not be schedule” and detail error is shown below.

Microsoft.CommerceServer.Marketing.DirectMailSchedulingException: The Direct Mail (ID=’12′) could not be scheduled.
The Direct Mailer Service account may not have the permissions required to schedule tasks correctly.
Please make sure that the following settings are correct:
  1. A Windows User Group called ‘DML_SG’ exists on the computer running the Direct Mailer Service.
  2. The Direct Mailer Service Account is a member of the ‘DML_SG’ Group.
  3. The ‘DML_SG’ Group has full permissions on the ‘%windir%tasks’ folder.
  4. The process calling the Marketing Management API (usually the Marketing Web Service account) is a member of the ‘DML_SG’ Group.
Steps 1, 2 and 3 are automatically configured when you run the Configuration Wizard.
You may need to reconfigure the ‘Direct Mailer’ feature using the ‘/r’ option of the Commerce Server Configuration Wizard.
The Inner Exception and the Event Log may have more details. —> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The Direct Mail (ID=’12′) could not be scheduled.
The Direct Mailer Service account may not have the permissions required to schedule tasks correctly.
Please make sure that the following settings are correct:
  1. A Windows User Group called ‘DML_SG’ exists on the computer running the Direct Mailer Service.
  2. The Direct Mailer Service Account is a member of the ‘DML_SG’ Group.
  3. The ‘DML_SG’ Group has full permissions on the ‘%windir%tasks’ folder.
  4. The process calling the Marketing Management API (usually the Marketing Web Service account) is a member of the ‘DML_SG’ Group.
Steps 1, 2 and 3 are automatically configured when you run the Configuration Wizard.
You may need to reconfigure the ‘Direct Mailer’ feature using the ‘/r’ option of the Commerce Server Configuration Wizard.
The Inner Exception and the Event Log may have more details. —> Microsoft.CommerceServer.Marketing.DirectMailSchedulingException: The Direct Mail (ID=’12′) could not be scheduled.
The Direct Mailer Service account may not have the permissions required to schedule tasks correctly.
Please make sure that the following settings are correct:
  1. A Windows User Group called ‘DML_SG’ exists on the computer running the Direct Mailer Service.
  2. The Direct Mailer Service Account is a member of the ‘DML_SG’ Group.
  3. The ‘DML_SG’ Group has full permissions on the ‘%windir%tasks’ folder.
  4. The process calling the Marketing Management API (usually the Marketing Web Service account) is a member of the ‘DML_SG’ Group.
Steps 1, 2 and 3 are automatically configured when you run the Configuration Wizard.
You may need to reconfigure the ‘Direct Mailer’ feature using the ‘/r’ option of the Commerce Server Configuration Wizard.
The Inner Exception and the Event Log may have more details. —> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.UnauthorizedAccessException: An error occurred when scheduling the Direct Mailer Task for Site ‘StarterSite’, Campaign Item ’12′: An error occurred while setting up the scheduled task. Task Name: ‘dml_job_site_StarterSite_item_12_test’  Command Line: ‘C:Program FilesMicrosoft Commerce Server 2007dmlrun.exe’  Parameters: ‘/create:type=test;site=”StarterSite”;id=12 /execute’:
   — End of inner exception stack trace —
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at Microsoft.CommerceServer.Internal.Marketing.DirectMailStorage.ExecuteSchedulingMethodOnDirectMailer(String methodName, String siteName, Int32 campaignItemId)
   — End of inner exception stack trace —
   at Microsoft.CommerceServer.Internal.Marketing.DirectMailStorage.ExecuteSchedulingMethodOnDirectMailer(String methodName, String siteName, Int32 campaignItemId)
   at Microsoft.CommerceServer.Internal.Marketing.DirectMailStorage.TestDirectMail(Int32 campItemId, Int32 maxTestListSize)
   at Microsoft.CommerceServer.Internal.Marketing.DataMarketingSystemImpl.TestDirectMail(Int32 campaignItemId)
   at Microsoft.CommerceServer.Marketing.WebService.MarketingWebService.TestDirectMail(Int32 campaignItemId)
   — End of inner exception stack trace —
   at Microsoft.CommerceServer.Marketing.WebService.MarketingWebService.PropagateOrLogExceptionInternal(Exception except)
   at Microsoft.CommerceServer.Marketing.WebService.MarketingWebService.PropagateOrLogException(Exception except)
   at Microsoft.CommerceServer.Marketing.WebService.MarketingWebService.TestDirectMail(Int32 campaignItemId)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.CommerceServer.Internal.Marketing.MarketingServiceProxy.AuthorizedInvoke(String methodName, Object[] parameters)
   — End of inner exception stack trace —
   at Microsoft.CommerceServer.ServiceAgent.TryHandleWebMethodException(Exception ex, SoapHttpClientProtocol serviceProxy)
   at Microsoft.CommerceServer.Internal.Marketing.MarketingServiceProxy.AuthorizedInvoke(String methodName, Object[] parameters)
   at Microsoft.CommerceServer.Internal.Marketing.MarketingServiceProxy.TestDirectMail(Int32 campaignItemId)
   at Microsoft.CommerceServer.Internal.Marketing.AgentMarketingSystemImpl.TestDirectMail(Int32 campaignItemId)
   at Microsoft.CommerceServer.Marketing.DirectMail.Test()
   at Microsoft.CommerceServer.UI.MarketingManager.PrimaryController.TryTestDirectMail(DirectMail dm)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

The error still persist even though if we perform all the operations mentioned in the error message. There are two things that can solve this error.

  • Open Registry using regedit.exe. Navigate to HK_LOCAL_MachineSoftwareMicrosoftSchedulingAgent and give full control to NT account under which marketing system is working (or add authenticate users).
  • Restart the machine.

Note: Some times the error still exist after performing IIS reset but the error will not come if we restart the box/VPC. So, I recommend restarting IIS first. If the problem still exists then restart the machine/VPC.

Related Articles


If you like this post, please click on our sponsor advertisement.


Leave a Reply

Follow me on Google+
Couldn't get data from google+
Sign up for Newsletter