G
Graham
I'm trying to create a web service that will allow a remote authenticated
user to start a DTS package. I've created the web service method as follows;
[WebMethod]
public bool TestDTS(string serverName, string packageName)
{
DTS.Package pkg = new DTS.PackageClass();
object pVarPersistStgOfHost = null;
pkg.LoadFromSQLServer(serverName, "", "",
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection,
"", "", "", packageName, ref pVarPersistStgOfHost);
pkg.Execute();
}
and added the appropriate COM reference and set up IIS to accept only
Windows authentication requests. Additionally I've set the <identity
impersonate="true" /> entry in the web.config file as I need the DTS package
to be run under the user 's account.
The DTS code in the method works as expected, however when I execute the
method, the package always executes under the local ASPNET user account not
the user's account therefore can't log into my database. Anyone any ideas on
how to get the package to run under the user's account?
Thanks,
Graham
user to start a DTS package. I've created the web service method as follows;
[WebMethod]
public bool TestDTS(string serverName, string packageName)
{
DTS.Package pkg = new DTS.PackageClass();
object pVarPersistStgOfHost = null;
pkg.LoadFromSQLServer(serverName, "", "",
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection,
"", "", "", packageName, ref pVarPersistStgOfHost);
pkg.Execute();
}
and added the appropriate COM reference and set up IIS to accept only
Windows authentication requests. Additionally I've set the <identity
impersonate="true" /> entry in the web.config file as I need the DTS package
to be run under the user 's account.
The DTS code in the method works as expected, however when I execute the
method, the package always executes under the local ASPNET user account not
the user's account therefore can't log into my database. Anyone any ideas on
how to get the package to run under the user's account?
Thanks,
Graham