perplexing SQL authentication from ASP.net issue
From: Robert Brown (robert.n.brown@treasury.sungard.com)
Date: 09/13/02
- Next message: Scott: "dbo gone"
- Previous message: Andrew J. Kelly: "Re: Number of operations between BEGIN and COMMIT"
- Next in thread: Russ Bjorgaard: "Re: perplexing SQL authentication from ASP.net issue"
- Reply: Russ Bjorgaard: "Re: perplexing SQL authentication from ASP.net issue"
- Reply: bruce barker: "Re: perplexing SQL authentication from ASP.net issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: robert.n.brown@treasury.sungard.com (Robert Brown) Date: 13 Sep 2002 05:16:14 -0700
Hi all,
Apologies for the cross-post, I cant really tell what's the issue
here...
I'm developing an asp.net intranet application using VS.net. The IIS
directory security is set to Integrated Windows Authentication only.
The dataserver (MS SQL 7) is on a separate machine to the IIS server,
but in the same domain. MS SQL is set to accept both Windows and SQL
authentication. I'm trying to use Windows authentication.
My NT user ID has permission on the database.
The problem is, when my asp.net app attempts to log into the database
I get the following error:
Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.
I've tried a variety of connection strings. I keep the connection
string in the Web.config file. I started out using the same
connection string that VS.net uses. I ripped it out of a
sqlConnection object:
data source=xxx212;initial catalog=Test;integrated
security=SSPI;persist security info=False;workstation id=xxx210;packet
size=4096
I'm able to connect fine from VS.Net (which is installed on the web
server) using this string.
I then built a connection string from a blank .udl file:
Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=Test;Data Source=xxx212
Still no go. I added a Trusted_Connection=yes. No good.
Trusted_Connection=true. No good.
I know that it should work because I have a classic asp page that
works perfectly:
--------------------------------------------------
dim dbc
Set dbc = Server.CreateObject("ADODB.Connection")
dbc.Open("DSN=QuantumSQL;SERVER=xxx212;DATABASE=Test;")
--------------------------------------------------
I have this page in the same directory as my ASP.net. Connects to the
same dataserver with no problem. I tried this connection in my
ASP.net app, but I got another message:
Unknown connection option in connection string: dsn.
...which I haven't pursued.
When I run my old asp server variables page, I can see that AUTH_USER
is my NT DOMAIN\uid, and AUTH_TYPE is Negotiate.
Can anyone please help out on this? Much appreciated....
Thanks,
Rob
- Next message: Scott: "dbo gone"
- Previous message: Andrew J. Kelly: "Re: Number of operations between BEGIN and COMMIT"
- Next in thread: Russ Bjorgaard: "Re: perplexing SQL authentication from ASP.net issue"
- Reply: Russ Bjorgaard: "Re: perplexing SQL authentication from ASP.net issue"
- Reply: bruce barker: "Re: perplexing SQL authentication from ASP.net issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|