Workaround for "Component properties could not be read (Showing a modal dialog box... )"

Topics: Issues 3: Executing the Component (Run-Time)
Feb 10, 2010 at 1:51 PM
Edited Feb 10, 2010 at 1:53 PM

When I execute as a Non Administrator a SQL Agent Job that executes a Package that contains this SCD component, I ran into the following error in the step of the job:

Executed as user: DEVELOPMENT\SSISExecution. Microsoft (R) SQL Server Execute Package Utility  Version 10.0.2531.0 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  16:46:55  Error: 2010-02-09 16:47:18.90     Code: 0x00000000     Source: GlobalTransactionTags to DimGlobalTransactionTags Kimball Method Slowly Changing Dimension     Description: Component properties could not be read (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.)  End Error  Error: 2010-02-09 16:47:18.93     Code: 0xC004706B     Source: GlobalTransactionTags to DimGlobalTransactionTags SSIS.Pipeline     Description: "component "Kimball Method Slowly Changing Dimension" (494)" failed validation and returned validation status "VS_ISBROKEN".  End Error  Error: 2010-02-09 16:47:18.93     Code: 0xC004700C     Source: GlobalTransactionTags to DimGlobalTransactionTags SSIS.Pipeline     Description: One or more component failed validation.  End Error  Error: 2010-02-09 16:47:18.93     Code: 0xC0024107     Source: GlobalTransactionTags to DimGlobalTransactionTags      Description: There were errors during task validation.  End Error  Error: 2010-02-09 16:47:18.93     Code: 0xC00220E4     Source: DimGlobalTransactionTag      Description: Error 0xC0012050 while preparing to load the package. Package failed validation from the ExecutePackage task. The package cannot run.  .  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  16:46:55  Finished: 16:47:18  Elapsed:  23.391 seconds.  The package execution failed.  The step failed.

The reason of this error is the invocation of MessagBox.Show in KimballSlowlyChangingDimensionConfiguration.cs:

System.Windows.Forms.MessageBox.Show("A problem occurred reading the metadata for the " + this._componentMetaData.Name + " component: " + ex.Message
                    + "  Metadata will be regenerated, but some settings may be lost.");

Then I commented this out and throw the exception myself:

throw new Exception("A problem occurred reading the metadata for the " + this._componentMetaData.Name + " component: " + ex.Message	+ "  Metadata will be regenerated, but some settings may be lost.");
				//System.Windows.Forms.MessageBox.Show("A problem occurred reading the metadata for the " + this._componentMetaData.Name + " component: " + ex.Message
				//	+ "  Metadata will be regenerated, but some settings may be lost.");

I recompiled the project myself with a new key (created using sn.exe), changed the public key in the package by opening using Notepad.exe and search-replace on PublicKey and redeployed package.

When executing the SQL Agent Job again, I got the following more descriptive error:

Executed as user: DEVELOPMENT\SSISExecution. Microsoft (R) SQL Server Execute Package Utility  Version 10.0.2531.0 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  13:17:14  Error: 2010-02-10 13:17:38.26     Code: 0x00000000     Source: MDBPrivate userTransactionTags to MDBBI DimUserTransactionTags Kimball Method Slowly Changing Dimension     Description: Component properties could not be read (A problem occurred reading the metadata for the Kimball Method Slowly Changing Dimension component: Unable to generate a temporary class (result=1).  error CS2001: Source file 'C:\Windows\TEMP\1wfq_t8z.0.cs' could not be found  error CS2008: No inputs specified    Metadata will be regenerated, but some settings may be lost.)  End Error  Error: 2010-02-10 13:17:38.29     Code: 0xC004706B     Source: MDBPrivate userTransactionTags to MDBBI DimUserTransactionTags SSIS.Pipeline     Description: "component "Kimball Method Slowly Changing Dimension" (1070)" failed validation and returned validation status "VS_ISBROKEN".  End Error  Error: 2010-02-10 13:17:38.30     Code: 0xC004700C     Source: MDBPrivate userTransactionTags to MDBBI DimUserTransactionTags SSIS.Pipeline     Description: One or more component failed validation.  End Error  Error: 2010-02-10 13:17:38.30     Code: 0xC0024107     Source: MDBPrivate userTransactionTags to MDBBI DimUserTransactionTags      Description: There were errors during task validation.  End Error  Error: 2010-02-10 13:17:38.32     Code: 0xC00220E4     Source: DimUserTransactionTag      Description: Error 0xC0012050 while preparing to load the package. Package failed validation from the ExecutePackage task. The package cannot run.  .  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  13:17:14  Finished: 13:17:38  Elapsed:  24.063 seconds.  The package execution failed.  The step failed.

 Then I decided to give the user DEVELOPMENT\SSISExecution rights to C:\WINDOWS\Temp and that fixed the issue!

Hopefully this helps for anyone who's bumping into this issue :)

Coordinator
Feb 11, 2010 at 6:23 AM

Thanks for the in-depth debugging.  I'll make that change to the source, and even include a hint in the exception that it may be the result of not having appropriate permissions to the temp folder.

Oct 26, 2010 at 9:08 PM

I've run into this exact problem and have tried granting full access to the account to C:\Windows\TEMP but am still getting the same error.  Can anyone provide any feedback on what else might work?

This works fine running the job under an administrator account.

 

Thanks,

Monty

Coordinator
Nov 25, 2010 at 7:37 PM

OK - having read the initial report better...

You're right about the MessageBox - I have replaced that with a FireError in v1.6.

But the second part - where you recompile - that problem is (likely) due to your original package not referring to the new version of the component you just created.  It doesn't matter if the DLL you make is named the same as mine.  The fact that you signed it (cause you have to) with your own key makes the "strong name" different, and that's what SSIS uses to figure out what to load up.  It can't load "my version" of the component - probably cause you uninstalled it - so it dies.  If that's the case, then you need to open your package and replace "my" KSCD with "yours" (by deleting the current one, adding yours to the toolbox, using it, and configuring it) then I think it will work.