473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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

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
1 3316
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: bigDWK | last post by:
Hi- Is it possible to do a trusted connection for a web server not on the same physical machine. By this I mean can I make a remote connection from a web server to a sql server using a trusted...
2
by: Jim Corey | last post by:
We're looking at logging on to SQLServer using Windows Authentication from an ASP app, and trying to figure out what will work. The following connection string works with Basic Authentication:...
4
by: CD | last post by:
Win03 and Win03SQLsp3a servers in the same domain. We are in hybrid mode with W03 DC's Back on NT 4, one could not do a trusted connection via web page when IIS and SQL were on different...
7
by: KathyK | last post by:
Hi and thanks in advance! I have an Access 2000 front end and a SQL Server 2000 back end. When the Access main form opens I run code that logs the user on to the SQL server using the generic read...
2
by: Paul M | last post by:
Hi, I've just implemented my first application onto a test web server. When the code comes to creating a connection object it throws an error saying the "Login failed for user '(null)'. Reason...
5
by: Mythran | last post by:
I have a test server and a development machine. I have SQL Server installed on both, the installations are pretty much identical. Both servers are in the same domain. When I run my application...
2
by: mike11d11 | last post by:
Our company has a collection system with a list of accounts in it, I connect to this system with access using an ODBC connection. I pull in the account #'s and other fields, then I have to run and...
4
by: Thyagu | last post by:
Hi, Is it possible to connect to SQL Server using trusted connection from unix? If yes, I'd like to know how. Regards, Thyagu.
3
by: Mad Scientist Jr | last post by:
I am getting the following error when trying to access a database with a trusted connection: "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." My...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.