U
UncleHarpoon
An asp application is attempting to log on to a database using the
SqlDataAdapter ADO. For some reason, the same connection strings that work in
non-web applications are refused when the asp application attempts to connect
with the same connection string.
Sqlconnection.connectionstring = “User ID=user00;Password=pw00;Initial
Catalog=test_db;Data Source=np:\\.\pipe\sql\queryâ€
Dim dt As New DataTable
Try
Dim query As String = "SELECT * from tableâ€
Dim dataAdapt As New SqlDataAdapter(query,sqlConnection)
dataAdapt.Fill(dt)
Catch SQLex As SqlException
Throw SQLex
End Try
The solution that I am currently using is using the impersonate feature in
the web.config:
<identity impersonate="true" userName="domain\username" password="pwd"/>
SqlDataAdapter ADO. For some reason, the same connection strings that work in
non-web applications are refused when the asp application attempts to connect
with the same connection string.
Sqlconnection.connectionstring = “User ID=user00;Password=pw00;Initial
Catalog=test_db;Data Source=np:\\.\pipe\sql\queryâ€
Dim dt As New DataTable
Try
Dim query As String = "SELECT * from tableâ€
Dim dataAdapt As New SqlDataAdapter(query,sqlConnection)
dataAdapt.Fill(dt)
Catch SQLex As SqlException
Throw SQLex
End Try
The solution that I am currently using is using the impersonate feature in
the web.config:
<identity impersonate="true" userName="domain\username" password="pwd"/>