Azure Blob Storage Exception in Custom Activity


i'm trying run custom activity following blog post: https://azure.microsoft.com/en-us/documentation/articles/data-factory-use-custom-activities/

i created dll in visual studio , added nuget references current version of azure storage (7.0):

i referenced dll in data factory project , published data factory azure, correctly uploaded zip file custom activity.

when data factory executes, however, output dataset fails following exception message:

"unknown error in module: system.reflection.targetinvocationexception: exception has been thrown target of invocation. ---> system.typeloadexception: not load type 'microsoft.windowsazure.storage.blob.cloudblob' assembly 'microsoft.windowsazure.storage, version=4.3.0.0, culture=neutral, publickeytoken=31bf3856ad364e35'. @ mydotnetactivityns.mydotnetactivity.calculate(blobresultsegment bresult, iactivitylogger logger, string folderpath, blobcontinuationtoken& token, string searchterm) @ mydotnetactivityns.mydotnetactivity.execute(ienumerable`1 linkedservices, ienumerable`1 datasets, activity activity, iactivitylogger logger) in c:\users\jocochr\documents\visual studio 2015\projects\customactivitydemo1\mycustomactivity\mydotnetactivity.cs:line 79 @ microsoft.azure.management.datafactories.runtime.activityexecutor.execute(object job, string configuration, action`1 logaction) --- end of inner exception stack trace --- @ system.runtimemethodhandle.invokemethod(object target, object[] arguments, signature sig, boolean constructor) @ system.reflection.runtimemethodinfo.unsafeinvokeinternal(object obj, object[] parameters, object[] arguments) @ system.reflection.runtimemethodinfo.invoke(object obj, bindingflags invokeattr, binder binder, object[] parameters, cultureinfo culture) @ microsoft.datapipeline.compute.hdinsightjobexecution.reflectingactivitywrapper.execute() in f:\_bld\12752\4106\sources\product\common\compute\src\hdicomputedelegatorjob\reflectingactivitywrapper.cs:line 44 @ microsoft.datapipeline.compute.hdinsightjobexecution.jobwrapper.runjob() in f:\_bld\12752\4106\sources\product\common\compute\src\hdicomputedelegatorjob\jobwrapper.cs:line 94 @ microsoft.datapipeline.compute.hdinsightjobexecution.launcher.main(string[] args) in f:\_bld\12752\4106\sources\product\common\compute\src\hdicomputedelegatorjob\launcher.cs:line 78."

i have bolded line indicates looking 4.3 version of microsoft.windowsazure.storage. appears there version mismatch.

any or guidance provide appreciated.

this known limitation of dotnetactivity reserves version of couple of assembly references our own, i.e. azure storage and json.net.

the recommended workaround is follow below sample uses appdomain trick in client's package:

https://github.com/azure/azure-datafactory/tree/master/samples/crossappdomaindotnetactivitysample

 

 


Microsoft Azure  >  Azure Data Factory



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'