Re: perplexing SQL authentication from ASP.net issue
From: bruce barker (nospam_brubar@safeco.com)
Date: 09/13/02
- Next message: BP Margolin: "Re: Read Only SQL Login and Crystal Reports"
- Previous message: Russ Bjorgaard: "Re: perplexing SQL authentication from ASP.net issue"
- In reply to: Robert Brown: "perplexing SQL authentication from ASP.net issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "bruce barker" <nospam_brubar@safeco.com> Date: Fri, 13 Sep 2002 10:49:20 -0700
you can not use TrustedConnection in this senario. if windows authentication
is used, the sql must be local or sql standard secuirty must be used. this
is because nt will not forward windows creditionals. you must use digest or
basic security to use trusted connections to a remote sql server.
-- bruce (sqlwork.com)
"Robert Brown" <robert.n.brown@treasury.sungard.com> wrote in message
news:ebe7b3f6.0209130416.7d702d3@posting.google.com...
> 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: BP Margolin: "Re: Read Only SQL Login and Crystal Reports"
- Previous message: Russ Bjorgaard: "Re: perplexing SQL authentication from ASP.net issue"
- In reply to: Robert Brown: "perplexing SQL authentication from ASP.net issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|