简体   繁体   中英

ASP.NET failing to load SSIS package: Value does not fall within the expected range

I have a ASP.NET Website which will reference a number of SSIS packages which influence an SQL database.

The first of these packages will clear all rows in a table which match an ASP NET session variable 'ID'.

The site seems to be pulling from the same SQL database okay, it just seems to be the SSIS packages which are having issues.

When I select load a package using the following syntax I get the following error:

    Package deletePkg = app.LoadPackage(deletePackageLocation, null);

Value does not fall within the expected range

I have quadruple checked the file path is correct.

The connection manager for this particular package seems happy when testing a connection, and is using the same configuration used multiple other times in the website. For whatever reason text and SQL logging do not seem to be working despite working in the SSIS development environment. (ID = ?)

After looking at numerous other discussions it has become clear that this is a pretty vague error message that can refer to any number of issues. None of which I have found have solutions fitting for my situation.

The solution was an unexpected issue.

deletePackageLocation was a class variable that was set on Page_load.

Although the variable was successfully set in a if(!IsPostBack) clause it was clearing before package loading. Once I defined the variable immediately before package loading it worked.

Very unusual solution, but it was what was preventing package loading at the end of the day.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM