bigator

I have “System.Reflection.TargetInvocationException” in my SSIS Package!!!

Hi guys,
I have got the following error message in my SSIS logs on executing one of my SSIS packages.

Error Message:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp) at System.Windows.Forms.MessageBox.Show(String text) at ST_c90e6b7b7027452898f11e3ccc01c81a.csproj.ScriptMain.Main() — End of inner exception stack trace — at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

ROOT CAUSE:
Well, i have identified the root cause that for logging purpose i have added script task in the “Event Handlers” section which pops-up the messagebox displaying the runtime error description on the screen. and i forgot to remove/disable it before deployment.

you make sure that if you get this kind of error message, then do look for this root cause i mentioned here. And for the resolution you know 🙂 what to do.

bigatorJanuary 27, 2012 · bigatorKhilitchandra Prajapati · bigator2 Comments
bigatorPosted in: Quick Tips, SQL Server, SSIS

2 Responses

  1. clarke - January 27, 2012

    Thanks for the post.
    Clarke.

  2. Harish Nanne - February 18, 2013

    Hey Thanks for the post. Its a nice one.

Leave a Reply


%d bloggers like this:
bigator