Re: ASP.NET Windows Authentication Problems

From: Paul Clement (UseAdddressAtEndofMessage@swspectrum.com)
Date: 10/08/02


From: Paul Clement <UseAdddressAtEndofMessage@swspectrum.com>
Date: Tue, 08 Oct 2002 12:24:50 -0500


On 8 Oct 2002 08:51:41 -0700, philip.pragnell@electricity.gg (Phil Pragnell, IT Developer) wrote:

¤ I wish to access a SQL Server database using Windows Authentication
¤ from an ASP.NET application. I have the following settings in my
¤ web.config file:
¤
¤ <authentication mode="Windows"></authentication>
¤ <identity impersonate="false"></identity>
¤
¤ In an attempt to understand the problem I've used the following code
¤ on the WebForm:
¤
¤ Dim wp As New System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent())
¤ Dim username As String = wp.Identity.Name
¤ Response.Write("wp identity is " & username)
¤ Response.Write("<BR>User Identity is " & User.Identity.Name.ToString)
¤
¤ This code outputs the following on the page:
¤
¤ wp identity is myserver\ASPNET
¤ User Identity is mydomain\myaccountname
¤
¤ In IIS on the development server I only have Integrated Windows
¤ Authentication. Anonymous access it not set.
¤
¤ HOWEVER when I attempt to access the SQL database I get the following
¤ error:
¤
¤ "Login failed for user '(null)'. Reason: Not associated with a trusted
¤ SQL Server connection."
¤
¤ I've had a look on Google Groups. A lot of people seem to
¤ experiencing similar problems, but I've yet to find any solutions.
¤
¤ Any help would be greatly appreciated.

Either this article or the Reference in the document may be relevant to the problem you are
encountering:

PRB: ASP/ODBC/SQL Server Error 0x80040E4D "Login Failed for User '(Null)'"
http://support.microsoft.com/default.aspx?scid=KB;EN-US;q307002&

Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)



Relevant Pages

  • ASP.NET Windows Authentication Problems
    ... I wish to access a SQL Server database using Windows Authentication ... User Identity is mydomain\myaccountname ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: SQL server question
    ... Microsoft is deprecating it even for new development, ... An Access project is an Access file that provides a direct, ... You can connect an Access project to a remote SQL Server ... a local SQL Server database, or a local installation of the SQL Server ...
    (comp.databases.ms-access)
  • Exactly How to Use Disconnected Recordsets in VB / SQL Server Application
    ... Front-end is VB 6.0, back-end is SQL Server 2000 (actually, MSDE since ... underlying SQL Server database w/the assumption that the user *might* ... the local disconnected recordset on the user's machine would seem to ... time to update each and every record as each user scrolls through the ...
    (microsoft.public.vb.database)
  • Re: DataSet.GetChanges() in RowChanged(DataRowAction.Add)
    ... if the way synchronization needs to be handled changes in the ... > data stored in an SQL Server database. ... > GetChanges() call, but I feel that this workaround is not my best choice. ...
    (microsoft.public.dotnet.framework.adonet)
  • VBA Microsoft Access and SQL Server
    ... I am currently working on a project with Power Point. ... into a Microsoft SQL Server database. ... information from the Microsoft SQL Server database and re-populate a Power ...
    (microsoft.public.office.developer.vba)

Quantcast