D
Dan
We are trying to use a System DSN to connect to a SQL
Server data source using an ASP.net application.
We create the DSN and configure it to use SQL
authentication. The DSN is tested to make sure it works.
Our ASP page contains the following simple code:
Dim connString As String = "DSN=myDSN;"
Dim conn As OdbcConnection = New OdbcConnection(connString)
Try
conn.Open()
Catch ex As Exception
Console.WriteLine(ex)
End Try
When this code is executed, the following error is
generated:
Message "ERROR [28000] [Microsoft][ODBC SQL Server Driver]
[SQL Server]Login
failed for user '(null)'. Reason: Not associated with a
trusted SQL Server
connection.
ERROR [28000] [Microsoft][ODBC SQL Server Driver][SQL
Server]Login failed
for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.
Our issues are:
1) We want to use the authentication mode configured in
the DSN we set up (not trusted in this case).
2) We do not want to pass the user name and password in
the connection string.
3) We do not want to have to grant special privileges to
the ASP.net account in order to access a System DSN.
Does anyone have ideas on how to use a System DSN with ASP
in this context?
Any assistance is appreciated.
Server data source using an ASP.net application.
We create the DSN and configure it to use SQL
authentication. The DSN is tested to make sure it works.
Our ASP page contains the following simple code:
Dim connString As String = "DSN=myDSN;"
Dim conn As OdbcConnection = New OdbcConnection(connString)
Try
conn.Open()
Catch ex As Exception
Console.WriteLine(ex)
End Try
When this code is executed, the following error is
generated:
Message "ERROR [28000] [Microsoft][ODBC SQL Server Driver]
[SQL Server]Login
failed for user '(null)'. Reason: Not associated with a
trusted SQL Server
connection.
ERROR [28000] [Microsoft][ODBC SQL Server Driver][SQL
Server]Login failed
for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.
Our issues are:
1) We want to use the authentication mode configured in
the DSN we set up (not trusted in this case).
2) We do not want to pass the user name and password in
the connection string.
3) We do not want to have to grant special privileges to
the ASP.net account in order to access a System DSN.
Does anyone have ideas on how to use a System DSN with ASP
in this context?
Any assistance is appreciated.