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

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: UncleHarpoon (UncleHarpoon_at_discussions.microsoft.com)
Date: 10/25/04


Date: Mon, 25 Oct 2004 07:19:02 -0700

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

-- 
Don Glman, P.E., MCP
Sr. Software Engineer
Energy Systems Lab, Texas A&M


Relevant Pages

  • Re: Thick client connection works, VB/ASP doesnt!
    ... the same connection strings that work ... non-web applications are refused when the asp application attempts to ... Dim dataAdapt As New SqlDataAdapter ... without even the implied warranty of merchantability ...
    (microsoft.public.inetserver.asp.general)
  • Re: Thick client connection works, VB/ASP doesnt!
    ... > An asp application is attempting to log on to a database using the ... the same connection strings that ... While you may be lucky enough to find a dotnet-savvy person here who can ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.general)
  • Re: Thick client connection works, VB/ASP doesnt!
    ... from your connection string it looks like you are ... using named pipes to connect. ... > An asp application is attempting to log on to a database using the ... > Dim dataAdapt As New SqlDataAdapter ...
    (microsoft.public.inetserver.asp.general)
  • Using Web.Config for Legacy .ASP to get A Connection String
    ... I have a mixed ASP.NET and legacy ASP application. ... the .ASP pages use a mix of Hard Coded connection strings and an ...
    (microsoft.public.dotnet.framework.aspnet)