none
DTS Runtime exception MVC to SSIS

    Pertanyaan

  • Hi, I am trying to create a web application where an action would run an ssis package. The Error i am getting is:

    "An exception of type
    'Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException' occurred in
    TestWebApp.dll but was not handled in user code
    
    Additional information: The package failed to load due to error
    0xC0011008 "Error loading from XML. No further detailed error information
    can be specified for this problem because no Events object was passed where
    detailed error information can be stored.". This occurs when
    CPackage::LoadFromXML fails."

    I have done some research on this, and it seems that the Runtime.dll version does not match the ssis package. The versions i have tried are: 10, 11, 12, and 13 of "Microsoft.SqlServer.Dts.Runtime". I am running the web application created in MVC on Visual Studio 2015 to SSIS Package "Server tools 2012". 

    I have also tried creating the web application in Microsoft Visual Studio 2012. 

    I have also tried all of the DLL versions available on Visual Studio 2012. 

    I cannot find anywhere to downgrade from version 10, however not sure if this would resolve the issue. 

    I have attached below the MVC code i use for this process. 

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    using Microsoft.SqlServer.Dts.DtsClient;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Data;
    using System.Text;
    
    namespace TestWebApp.Controllers
    {
        public class HomeController : Controller
        {
            static DtsConnection connection;
            static DtsCommand command;
            static IDataReader reader;
    
            public ActionResult Index()
            {
                Application app = new Application();
                Package package = null;
                try
                {
                    //Load DTSX
                    package =
        app.LoadPackage(@"C:\RPopa Dev Folder\SSIS WITH MVC\SSISMovingTest\SSISMovingTest\Package.dtsx", null);
                    
                    //Execute DTSX.
                    Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    package.Dispose();
                    package = null;
                }
    
                using (connection = new DtsConnection())
                {
                    connection.ConnectionString = @"C:\RPopa Dev Folder\SSIS WITH MVC\SSISMovingTest\SSISMovingTest\Package.dtsx";
                    try
                    {
                        connection.Open();
                        command = new DtsCommand(connection);
                        command.CommandText = "DataReaderDest";
                        reader = command.ExecuteReader(CommandBehavior.Default);
                        while (reader.Read())
                        {
                            Console.WriteLine(string.Format("Full name: " +
                                reader[0] +
                                " City" + reader[1]));
                        }
                    }
                    catch (ApplicationException caught)
                    {
                        Console.WriteLine(caught.Message + " ,something is wrong");
                    }
                    finally
                    {
                        Console.Read();
                    }
                }
                return View();
            }
    
            public ActionResult About()
            {
                ViewBag.Message = "Your application description page.";
    
                return View();
            }
    
            public ActionResult Contact()
            {
                ViewBag.Message = "Your contact page.";
    
                return View();
            }
        }
      } 

    I hope that you can help with my issue. 

    Thanks Paul 

    29 Agustus 2018 8:40

Semua Balasan

  • Hi Paul Lees at DCThomson,

    Thank you for posting here.

    Since your question is more related to Web, you could post a new thread in ASP.NET forum for suitable support.

    https://forums.asp.net/

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework, including Managed Extensibility Framework (MEF), Charting Controls, CardSpace, Windows Identity Foundation (WIF), Point of Sale (POS), Transactions.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    30 Agustus 2018 3:42