Reputation: 21
I am building an application that scaffolds a SSIS package using EzAPI (Version 0.8.5). The code runs perfect within visual studio, no errors or bugs until I publish the MVC application (.NET 4.5) to the IIS server (Version 10.0.14298). This is when the function fails and doesn't save the package. The following error is thrown on save:
{"The system cannot find the file specified. (Exception from HRESULT: 0x80070002)":null} source: Microsoft.SqlServer.ManagedDTS
I have ensured that SSIS, Integration services have been installed on the IIS server, exact same version as my local instance MSSQL2017 so the DLL's I require are all in the same folders. I deployed to my local instance of IIS and get the same error as well.
using Microsoft.SqlServer.SSIS.EzAPI;
EzPackage _package = new EzPackage() { Name = "Package" };
_package.SaveToFile(@"C:\Package.dtsx"); // Fails here with error
The expectation would be that the package would be generated and then I would be able to view it within the C drive but it looks like it fails when it tries to build / finalize the package
Stack Trace:
" at Microsoft.SqlServer.Dts.Runtime.Package.SaveToXML(String& packageXml, IDTSEvents events)\r\n at Microsoft.SqlServer.SSIS.EzAPI.EzPackage.SaveToXML(IDTSEvents events)\r\n at Microsoft.SqlServer.SSIS.EzAPI.EzPackage.SaveToFile(String fileName)\r\n at method(ViewModel model) in Logic.cs:line 641"
Upvotes: 0
Views: 118
Reputation: 782
Try creating a folder in C:. For example, C:\packages
. Make sure the app pool user has read/write access to the folder. Try adding IUSR or the app pool ( IIS AppPool\ApplicationPoolName
) user to the C:\packages
folder with read write permissions.
Upvotes: 0