DalePres
6/10/2004 2:49:00 AM
I'm not sure it's clear in the previous responses so let me simplify the
whole thing. What you're trying to do will only work if IIS and SQL Server
are on the same machine. If not, you would have to use SQL Server logins in
your connection string to access the SQL Server from your webservice.
Dale
"Graham" <grahams@hushmail.com> wrote in message
news:%233WMmDJTEHA.3224@TK2MSFTNGP10.phx.gbl...
> 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
>
>