D
Dominick Baier
is the sql server on the same machine or on a different machine?
if on the same : grant NT Authority\Network Service access to the db
if on another machine : either use a domain account for the worker process or grant MACHINENAME$ access to sql
---
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
nntp://news.microsoft.com/microsoft.public.dotnet.framework.aspnet.security/<#[email protected]>
Hi,
I've got an ASP.NET web application which uses Windows security with a SQL
Server database. I want to use the application pool identity to make the
connection to the SQL server database. If I set the authentication tag to
None and impersonation to false I get the following:
===
Event Type: Error
Event Source: ExceptionManagerPublishedException
Event Category: None
Event ID: 0
Date: 10/15/2004
Time: 5:54:26 PM
User: N/A
Computer: IPDDFZ0025ATL2
Description:
General Information
*********************************************
Additional Info:
ExceptionManager.MachineName: (removed)
ExceptionManager.TimeStamp: 10/15/2004 5:54:26 PM
ExceptionManager.FullName: Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1746.26470, Culture=neutral, PublicKeyToken=null
ExceptionManager.AppDomainName:
/LM/W3SVC/1518623831/Root-12-127423650871912556
ExceptionManager.ThreadIdentity:
ExceptionManager.WindowsIdentity: NT AUTHORITY\NETWORK SERVICE
1) Exception Information
*********************************************
Exception Type: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlErrorCollection
Class: 14
LineNumber: 0
Message: Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection.
Number: 18452
Procedure:
Server:
State: 1
Source: .Net SqlClient Data Provider
TargetSite: System.Data.SqlClient.SqlInternalConnection
GetConnection(Boolean ByRef)
HelpLink: NULL
StackTrace Information
*********************************************
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at InDIMENSIONS.Web.SmartForm.ContactForm.CreateContactRecord(String
inquiryType, String subject, String message, String name, String
emailAddress, String ipAddress, String fileName)
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
===
Given that the app is running under the NETWORK SERVICE identity, would it
not use that to make the connection?
The application and SQL Server instance are on the same server, Windows
Server 2003.
The articles I've read on MSDN so far haven't been very clear about this.
Can someone provide an example or guidance on what I need to set to get this
scenario working?
Thanks!
Colin
[microsoft.public.dotnet.framework.aspnet.security]
if on the same : grant NT Authority\Network Service access to the db
if on another machine : either use a domain account for the worker process or grant MACHINENAME$ access to sql
---
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
nntp://news.microsoft.com/microsoft.public.dotnet.framework.aspnet.security/<#[email protected]>
Hi,
I've got an ASP.NET web application which uses Windows security with a SQL
Server database. I want to use the application pool identity to make the
connection to the SQL server database. If I set the authentication tag to
None and impersonation to false I get the following:
===
Event Type: Error
Event Source: ExceptionManagerPublishedException
Event Category: None
Event ID: 0
Date: 10/15/2004
Time: 5:54:26 PM
User: N/A
Computer: IPDDFZ0025ATL2
Description:
General Information
*********************************************
Additional Info:
ExceptionManager.MachineName: (removed)
ExceptionManager.TimeStamp: 10/15/2004 5:54:26 PM
ExceptionManager.FullName: Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1746.26470, Culture=neutral, PublicKeyToken=null
ExceptionManager.AppDomainName:
/LM/W3SVC/1518623831/Root-12-127423650871912556
ExceptionManager.ThreadIdentity:
ExceptionManager.WindowsIdentity: NT AUTHORITY\NETWORK SERVICE
1) Exception Information
*********************************************
Exception Type: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlErrorCollection
Class: 14
LineNumber: 0
Message: Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection.
Number: 18452
Procedure:
Server:
State: 1
Source: .Net SqlClient Data Provider
TargetSite: System.Data.SqlClient.SqlInternalConnection
GetConnection(Boolean ByRef)
HelpLink: NULL
StackTrace Information
*********************************************
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at InDIMENSIONS.Web.SmartForm.ContactForm.CreateContactRecord(String
inquiryType, String subject, String message, String name, String
emailAddress, String ipAddress, String fileName)
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
===
Given that the app is running under the NETWORK SERVICE identity, would it
not use that to make the connection?
The application and SQL Server instance are on the same server, Windows
Server 2003.
The articles I've read on MSDN so far haven't been very clear about this.
Can someone provide an example or guidance on what I need to set to get this
scenario working?
Thanks!
Colin
[microsoft.public.dotnet.framework.aspnet.security]