c# - How to use Application.LoadFromSQLServer in Window authentication -


i want load ssispackages programatically.i using application.loadfromsqlserver method ask parameters

public package loadfromsqlserver(             string packagepath,             string servername,             string serverusername,             string serverpassword,             idtsevents events         ) 

and using windows authentication.so how use method in windows authentication mode.

if set package role when import package ssis, can pass null userid , password:

microsoft.sqlserver.dts.runtime.package pkg = default(microsoft.sqlserver.dts.runtime.package); microsoft.sqlserver.dts.runtime.application app = new microsoft.sqlserver.dts.runtime.application();  pkg = app.loadfromsqlserver("/maintenance plans/testpackage", "deepthought", null, null, null); pkg.execute(); 

Comments