Execute SSIS Package from ASP.NET
Hi,
I create one SSIS package to export data from a flat file, which is executing correctly through Visual studio.
My actual requirement is to execute this package from Asp.Net page.
So following C# code is using. After executing failure message is getting. Anybody can help on this?
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Application app = new Application();
Package package = app.LoadPackage(@"C:\Projects\SSIS\AjSSIS\AjDTS.dt sx", null);
DTSExecResult result = package.Execute();
Response.Write(result.ToString());
}
}
Thanks
Ghari :)
|