I am creating an import activity through server-side javascript. The import is throwing an exception:

An error has occurred: {"message":"Unable to retrieve security descriptor for this frame.","description":"System.InvalidOperationException: Unable to retrieve security descriptor for this frame. - from mscorlib\r\n\r\n"}

I can't figure this one out. It seems to be something general about the import itself, or possibly a missing property. Since this is in a server-side javascript activity in the account, it shouldn't need to authenticate. Any ideas? Here is the code:


 // Data Extension
var DataExtensionName = "TempDataExtension" + GUID();
var DataExtensionConfig = {
for (var i = 1; i <= 50; i++) DataExtensionConfig.Fields[i] = {"Name":"Field" + i, "FieldType":"Text", "MaxLength":500};
var DataExtensionObj = DataExtension.Add(DataExtensionConfig);

// Gets the DataExtension as an SOAP API Object for the SOAP API ImportDefinition below.  Seemed to be a necessary workaround.
var DataExtensionObj = Platform.Function.CreateObject("DataExtension");                    
Platform.Function.SetObjectProperty(DataExtensionObj, "CustomerKey", DataExtensionName);

// Import Definition
var ImportDefinition = Platform.Function.CreateObject("ImportDefinition");
var ImportDefinitionName = "TempImportDefinition" + GUID();
Platform.Function.SetObjectProperty(ImportDefinition, "Name", ImportDefinitionName);
Platform.Function.SetObjectProperty(ImportDefinition, "Description", ImportDefinitionName);
Platform.Function.SetObjectProperty(ImportDefinition, "CustomerKey", ImportDefinitionName);
Platform.Function.SetObjectProperty(ImportDefinition, "HeaderLines", 0);
Platform.Function.SetObjectProperty(ImportDefinition, "AllowErrors", 1);
Platform.Function.SetObjectProperty(ImportDefinition, "DestinationObject", DataExtensionObj);
Platform.Function.SetObjectProperty(ImportDefinition, "UpdateType", "Overwrite");
Platform.Function.SetObjectProperty(ImportDefinition, "FileSpec", "subscribers.txt");
Platform.Function.SetObjectProperty(ImportDefinition, "FileType", "CSV");

var FileTransferLocation = Platform.Function.CreateObject("FileTransferLocation");
Platform.Function.SetObjectProperty(FileTransferLocation, "CustomerKey", "ExactTarget Enhanced FTP");
Platform.Function.SetObjectProperty(ImportDefinition, "RetrieveFileTransferLocation", FileTransferLocation);
Platform.Function.SetObjectProperty(ImportDefinition, "FieldMappingType", "MapByOrdinal");

for (var i = 1; i <= 50; i++){

    FieldMap = Platform.Function.CreateObject("FieldMap");
    Platform.Function.SetObjectProperty(FieldMap, "DestinationName", "Field" + i);
    Platform.Function.SetObjectProperty(FieldMap, "Item", i);
    Platform.Function.AddObjectArrayItem(ImportDefinition, "FieldMaps", FieldMap);


var AsyncResponse = Platform.Function.CreateObject("AsyncResponse");
Platform.Function.SetObjectProperty(AsyncResponse, "ResponseType", "email");
Platform.Function.SetObjectProperty(AsyncResponse, "ResponseAddress", "mmcnally@listengage.com");
Platform.Function.SetObjectProperty(ImportDefinition, "Notification", AsyncResponse);

var StatusAndRequestID = [0,0];
var CreateResults = Platform.Function.InvokeCreate(ImportDefinition, StatusAndRequestID);
  • I researched this online and found that it may be a DLL issue. Should ExactTarget take a look at this? Citation: forums.textcontrol.com/… – Michael Apr 21 '15 at 1:00
  • Here is more on the DDL issue. Looks like a .Net upgrade is required to fix it: stackoverflow.com/questions/727888/… – Michael Apr 22 '15 at 19:51
  • Hi, do you remember about how you solved this issue ? I'm facing the same one currently... – AshBringer Jan 23 '19 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.