SharePoint 2010: Exception has been thrown by the target of an invocation

Your ads will be inserted here by

Easy Ads.

Please go to the plugin admin page to set up your ad code.

Tried adding a new SharePoint 2010 server to an existing farm, and got this perplexing, and un-googleable message while running the product configuration wizard:

03/29/2011 16:02:21  11  ERR                                              Task services has failed with an unknown exception
03/29/2011 16:02:21  1  INF                                              Not running in high contrast, so we will paint the background with our trademarked image
03/29/2011 16:02:21  11  ERR                                              Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: The directory name you entered is invalid.  Please enter a new name.
 at Microsoft.SharePoint.Administration.SPDiagnosticsService.set_LogLocation(String value)
 at Microsoft.SharePoint.Administration.SPDiagnosticsService.InitSPDiagnosticsServiceFromRegistry(SPDiagnosticsService service)
 --- End of inner exception stack trace ---
 at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
 at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
 at Microsoft.SharePoint.PostSetupConfiguration.ReflectionHelper.InvokeConstructor(String assemblyQualifiedName, Type[] constructorSignature, Object[] constructorParameters)
 at Microsoft.SharePoint.PostSetupConfiguration.TaskCommon.ReflectionHelperInvokeConstructor(String assemblyQualifiedName, Type[] constructorSignature, Object[] constructorParameters, TaskBase task)
 at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InvokeServiceConstructor(String serviceRegistryKeyName, String solutionIdRegistryName, String serviceNameRegistryName, Type[] constructorSignature, Object[] constructorParameters)
 at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInConfigDB(Boolean provisionTheServiceToo, String serviceRegistryKeyName)
 at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServices(Boolean provisionTheServicesToo)
 at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.Run()
 at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

The clue was the line: The directory name you entered is invalid.  I noticed on the existing servers that there was a SharePoint log directory on the D: drive, and suspected this to be the issue.

Your ads will be inserted here by

Easy Ads.

Please go to the plugin admin page to set up your ad code.

At first attempt, I changed the location of the diagnostic and usage logging, to no avail.  I ended up requesting an additional disk for my new server, creating the log directory on the D: drive and re-running the wizard.  This worked.

Your ads will be inserted here by

Easy Ads.

Please go to the plugin admin page to set up your ad code.

2 thoughts on “SharePoint 2010: Exception has been thrown by the target of an invocation”

  1. Hi thanks !
    I got the same problem adding a new server to an existing farm. Adding a logdisk at same path as the other servers solved it for me to 🙂 and the key in the logs was
    System.ArgumentException: The directory name you entered is invalid.
    -geirs

Leave a Reply

Your email address will not be published. Required fields are marked *