By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,383 Members | 2,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,383 IT Pros & Developers. It's quick & easy.

Trusted connection doesn't work with SQL server and ASP.Net

P: n/a
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_UseTrus tedConnection, , , ,
"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,

--
Peter Afonin
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Thank you.

Yes, I use domain\ASPNET account.

Peter

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:us****************@TK2MSFTNGP11.phx.gbl...
Unless you've set up a Domain ASPNET account, it doesn't exist. The ASPNET
account is a machine-level account.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
The more I learn, the less I know.

"Peter Afonin" <pa**@specialtypulltabs.com> wrote in message
news:ew**************@TK2MSFTNGP09.phx.gbl...
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_UseTrus tedConnection, , , ,
"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,

--
Peter Afonin


Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.