Sunday, April 25, 2010

DTSX failed to execute when invoked from web application ASP.Net

Hi there...

Usually i use to have a console application to execute a DTSX file(SQL Server Integration Service - Business Intelligence application) And schedule it to run for automated execution.
(http://mohammedfauzi.blogspot.com/2009/10/how-to-run-dtsx-programmatically.html)

This time the requirement was to run another DTSX file on demand by end user. So we decided to go for a web application.

I made use of the same code which i used in previous post on submit click event here. Earlier i was getting permission related errors. The issue was solved when i gave permission for the respective user on whose credential the request is executed as anonymous user. When this issue was fixed, The other issue came was that the "Execution Failed" When the web page was executed from outside. Apparently it was working great when executed from Visual studio! Still the permission related issue was there...

After lots of Googling & trials found the solution!!!

Solution:
you need to the following:
1. In IIS, Right Click the Project -> Properties
2. Click on ASP.NET tab
3. Click 'Edit Configuration' button
4. Click 'Application' Tab
5. Under Identity Settings -> Click the Checkbox 'Local Impersonation'
6. Give the user name & password for local user of the machine(who has access to run the DTSX applicaiton)

Thats it... now when you run the web application it works fine :)

Hope It Helps...

Regards
Fauzi




No comments: