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

G

Guest

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,
 
G

Guest

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
 
G

Guest

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.
 
S

Steven Cheng[MSFT]

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top