Re: Authentication methods for connections to SQL Server in ASP Pa



Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.

Did you enter a domain account that has access to SQL Server when you were
prompted by IIS for your user/password? That information is used to
establish credentials for the trusted connection.

Additionally,
My users have been place into Groups, 1, 2, and 3. With each group having
different permissions. How does SQL know when the user attempts to access
the db which group they belong to and to allow or deny them access?

I assume by 'groups', you mean database roles. The domain account specified
in the basic authentication dialog needs to be granted access to both sql
server and to your database. This establishes the individual user identity
and database security context. SQL Server checks to ensure that the user
belongs to a role that has permissions on database objects used directly by
the application. Permissions on indirectly referenced objects (e.g. table
used in a procedure executed by the user) are not checked as long as the
objects involved have the same owner.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"AuntieAuntieAuntie" <AuntieAuntieAuntie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:4AB54844-C546-4019-A44E-86841D1420C6@xxxxxxxxxxxxxxxx
I made the following changes:
cst = "Provider=SQLOLEDB;data source=X099789\Widgets;Database=Automotive;
Trusted_Connection=yes;Integrated Security=SSPI;"

Now I receive the following error message.
Microsoft OLE DB Provider for SQL Server error '80004005'

Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.

Additionally,
My users have been place into Groups, 1, 2, and 3. With each group having
different permissions. How does SQL know when the user attempts to access
the db which group they belong to and to allow or deny them access?

Auntie.


"Dan Guzman" wrote:

Microsoft OLE DB Service Components error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB
status
value, if available. No work was done.

These errors are probably because there is no 'Provider' keyword in your
OLEDB connection string. Try adding 'Provider=SQLOLEDB'.


--
Hope this helps.

Dan Guzman
SQL Server MVP

"AuntieAuntieAuntie" <AuntieAuntieAuntie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in
message news:EE4C5259-1F64-4893-9AF1-657A1C03917B@xxxxxxxxxxxxxxxx
I am trying to access SQL Server via an ASP page using a Trusted
Connection,
but it is not working. When I run the page I receive the following
error
message:
Microsoft OLE DB Service Components error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB
status
value, if available. No work was done.
line 35

My connection string is in a separate file: cst = "data
source=X099789\Widgets;Initial Catalog=Automotive; Integrated
Security=SSPI;"

My code snipet looks like the following:
set OBJRST = Server.CreateObject("ADODB.Recordset")
Set objComm = Server.CreateObject("ADODB.Command")

objComm.ActiveConnection = cst '****LIne 35
MotorsSQL = "usp_MotorAll"
UIPWSQL = "usp_UIPW '" & struserid &"', '"& strpassword &"';"

objConnAll.open cst

What is the correct coding to connect to the SQL Server using Windows
Authentication in an ASP page?
I have read the instructions on:
http://support.microsoft.com/default.aspx/kb/247931, made the changes,
however the page still will not work.

Kindly assist. I will be thankful.

AuntieAuntieAuntie






.



Relevant Pages

  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... Create a Connection object and pass in a ConnectionString to ... manage the database table you reference. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: (Newbie)Application Roles
    ... level: the database itself. ... SQL Server accommodates these needs through the use of application ... the user's connection through a specific application. ... the connection permanently loses all permissions applied to ...
    (microsoft.public.sqlserver.security)
  • Re: Help! Set up Windows Group to access application
    ... The connection string for a trusted connection is: ... --add login as database user ... SQL Server MVP ... If you have troubles with finding your ways in Crystal Reports, ...
    (microsoft.public.sqlserver.security)
  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Visual Studio but not to VS 2003. ... Create a Connection object and pass in a ConnectionString to address ... manage the database table you reference. ... Yep, my latest book can help too, but mostly if you're targeting SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Logging in in background
    ... wold take all kinds of modifictions as I'd need to be checking that each SQL ... my database and all have connection strings associated with them. ... I suspect that there is also an issue on the SQL Server side as I keep ...
    (microsoft.public.access.modulesdaovba)