Thick client connection works, VB/ASP doesn't!

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"/>
 
R

Roland Hall

in message
: 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"/>

This is a Classic ASP NG, not ASP.NET.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
B

Bob Barrows [MVP]

UncleHarpoon said:
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"

There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.adonet.

Bob Barrows
 
M

Mark Schupp

As others have pointed out this is a "traditional" asp newsgroup, not an
asp.net one. However, from your connection string it looks like you are
using named pipes to connect. Have you tried TCP/IP instead?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top