P
Peter Afonin
Hello:
I need to execute a DTS package from an ASP.Net application. The SQL server
registration properties are set to "Use Windows authentication".
domain\ASPNET is among the SQL server users.
However, when I use this string to load DTS package:
oPkg.LoadFromSQLServer("WIN2000", , ,
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection, , , ,
"Import_Sales_History")
I get this error:
"System.Runtime.InteropServices.COMException (0x80004005): Login failed for
user '(null)'. Reason: Not associated with a trusted SQL Server connection.
at DTS._Package.LoadFromSQLServer(String ServerName, String
ServerUserName, String ServerPassword, DTSSQLServerStorageFlags Flags,
String PackagePassword, String PackageGuid, String PackageVersionGuid,
String PackageName, Object& pVarPersistStgOfHost)
If I specify UID and password:
oPkg.LoadFromSQLServer("WIN2000", "UID", "password",
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, , , ,
"Import_Sales_History")
everything works OK.
Why the trusted connection doesn't work in my case, despite that the SQL
server properties are set to use it?
I would appreciate your help.
Thank you,
I need to execute a DTS package from an ASP.Net application. The SQL server
registration properties are set to "Use Windows authentication".
domain\ASPNET is among the SQL server users.
However, when I use this string to load DTS package:
oPkg.LoadFromSQLServer("WIN2000", , ,
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection, , , ,
"Import_Sales_History")
I get this error:
"System.Runtime.InteropServices.COMException (0x80004005): Login failed for
user '(null)'. Reason: Not associated with a trusted SQL Server connection.
at DTS._Package.LoadFromSQLServer(String ServerName, String
ServerUserName, String ServerPassword, DTSSQLServerStorageFlags Flags,
String PackagePassword, String PackageGuid, String PackageVersionGuid,
String PackageName, Object& pVarPersistStgOfHost)
If I specify UID and password:
oPkg.LoadFromSQLServer("WIN2000", "UID", "password",
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, , , ,
"Import_Sales_History")
everything works OK.
Why the trusted connection doesn't work in my case, despite that the SQL
server properties are set to use it?
I would appreciate your help.
Thank you,