How to call an SSIS package from ASP.NET 2.0?

Discussion in 'ASP .Net' started by =?Utf-8?B?TWljaGFlbA==?=, Jun 7, 2007.

  1. Hi,
    I need to call an SSIS package from ASP.NET 2.0 web page. First I triy to
    call it directly from the asp.net page, as the following:
    Dim app As New Application
    Dim pack As Package = app.LoadPackage("C:\GetNorthwindEmployee.dtsx",
    Nothing)
    Dim result As DTSExecResult = pack.Execute()

    This fails although the same code in Windows app works. I think it's a
    security rights issue so I give the full control right to the dtsx file and
    set the system administrator for the anonymous access for the concerned
    website in IIS (for testing purposes) but it still doesn't work.

    Then I try to call the exe file from the the web page. I used to be able to
    do this with VS2003,
    Shell("C:\VS2005\RunSSIS\RunSSIS\bin\Release\RunSSIS.exe", AppWinStyle.Hide,
    False)
    but with VS2005, this stopped working.

    Can anyone help me on this?

    Thanks,
    =?Utf-8?B?TWljaGFlbA==?=, Jun 7, 2007
    #1
    1. Advertising

  2. On Jun 7, 5:48 pm, Michael <> wrote:
    > Hi,
    > I need to call an SSIS package from ASP.NET 2.0 web page. First I triy to
    > call it directly from the asp.net page, as the following:
    > Dim app As New Application
    > Dim pack As Package = app.LoadPackage("C:\GetNorthwindEmployee.dtsx",
    > Nothing)
    > Dim result As DTSExecResult = pack.Execute()
    >
    > This fails although the same code in Windows app works. I think it's a
    > security rights issue so I give the full control right to the dtsx file and
    > set the system administrator for the anonymous access for the concerned
    > website in IIS (for testing purposes) but it still doesn't work.
    >
    > Then I try to call the exe file from the the web page. I used to be able to
    > do this with VS2003,
    > Shell("C:\VS2005\RunSSIS\RunSSIS\bin\Release\RunSSIS.exe", AppWinStyle.Hide,
    > False)
    > but with VS2005, this stopped working.
    >
    > Can anyone help me on this?
    >
    > Thanks,


    Hi Michael

    try to capture SQL error as per example
    http://msdn2.microsoft.com/en-us/library/ms136090(SQL.90).aspx

    Cheers
    Alexey Smirnov, Jun 7, 2007
    #2
    1. Advertising

  3. On Jun 7, 10:45 pm, Alexey Smirnov <> wrote:
    > On Jun 7, 5:48 pm, Michael <> wrote:
    >
    >
    >
    >
    >
    > > Hi,
    > > I need to call an SSIS package from ASP.NET 2.0 web page. First I triy to
    > > call it directly from the asp.net page, as the following:
    > > Dim app As New Application
    > > Dim pack As Package = app.LoadPackage("C:\GetNorthwindEmployee.dtsx",
    > > Nothing)
    > > Dim result As DTSExecResult = pack.Execute()

    >
    > > This fails although the same code in Windows app works. I think it's a
    > > security rights issue so I give the full control right to the dtsx file and
    > > set the system administrator for the anonymous access for the concerned
    > > website in IIS (for testing purposes) but it still doesn't work.

    >
    > > Then I try to call the exe file from the the web page. I used to be able to
    > > do this with VS2003,
    > > Shell("C:\VS2005\RunSSIS\RunSSIS\bin\Release\RunSSIS.exe", AppWinStyle.Hide,
    > > False)
    > > but with VS2005, this stopped working.

    >
    > > Can anyone help me on this?

    >
    > > Thanks,

    >
    > Hi Michael
    >
    > try to capture SQL error as per examplehttp://msdn2.microsoft.com/en-us/library/ms136090(SQL.90).aspx
    >
    > Cheers- Hide quoted text -
    >
    > - Show quoted text -


    Also, to get more information about the error, configure SSIS logging
    for this package.
    Alexey Smirnov, Jun 7, 2007
    #3
  4. Hi Michael,

    For such problem, the code works correctly in a winform application but
    fails in ASP.NET application, we would first check the security context of
    the running code. Winform application is quite different from ASP.NET
    application one this. For winform application, it by default runs under the
    current logon user's account. However, ASP.NET application will run under
    IIS worker process identity by default( IIS5 use machine\ASPNET account
    while IIS6 use Network Service account).

    I suggest you check the ASP.NET application's running security identity
    first, if it is running under default security identity, you can try
    configure it to running under the certain user account(such as the
    interactive user your winform run as ):

    #Configuring ASP.NET Process Identity
    http://msdn2.microsoft.com/en-us/library/dwc1xthy.aspx

    Also, another means to configure ASP.NET application run under a specify
    account is using impersonate, you can refer to the following article:

    #How To: Use Impersonation and Delegation in ASP.NET 2.0
    http://msdn2.microsoft.com/en-us/library/ms998351.aspx


    BTW, you can use the following code to print out the current security
    identity in ASP.NET code:

    Response.Write("<br/>identity: " +
    System.Security.Principal.WindowsIdentity.GetCurrent().Name);

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    ==================================================

    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.



    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Steven Cheng[MSFT], Jun 8, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carlos A.

    How can I call SSIS from ASP.NET (VB)

    Carlos A., Aug 10, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    6,378
    Carlos A.
    Aug 10, 2006
  2. Luigi
    Replies:
    2
    Views:
    1,724
    Luigi
    Feb 7, 2008
  3. Luigi
    Replies:
    7
    Views:
    4,842
    Misbah Arefin
    Mar 13, 2008
  4. pvong
    Replies:
    2
    Views:
    663
    Misbah Arefin
    Apr 14, 2008
  5. Luigi
    Replies:
    1
    Views:
    759
    Gregory A. Beamer
    Dec 9, 2009
Loading...

Share This Page