Re: Weird ODBC Behavior on IIS server
From: Tom Kaminski [MVP] ((A_at_T))
Date: 11/08/04
- Next message: bill_at_sempf.net.nospam: "Error 450 when using MSWC.IISLOG with IIS 6.0"
- Previous message: Thomas: "OpenSSL Validation with IIS/ASP"
- In reply to: timperkins: "Weird ODBC Behavior on IIS server"
- Next in thread: timperkins: "Re: Weird ODBC Behavior on IIS server"
- Reply: timperkins: "Re: Weird ODBC Behavior on IIS server"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 8 Nov 2004 08:10:05 -0500
"timperkins" <timperkins@discussions.microsoft.com> wrote in message
news:6C4BBD1C-4A83-4201-A9FA-5E06F28103A1@microsoft.com...
> I've just upgraded our Intranet Server to Windows 2003 and IIS 6. The
> site
> uses basic authentication and connects to a SQL Server and Oracle
> databases
> using ODBC connections on the IIS host... We're using classic ASP to
> display
> the database data.
>
> Our ASP pages appear to be connecting to the database using the users
> credentials, rather than the credentials in the ODBC DSN connection.
> Here's
> a code snippet:
>
> <%
> strSQL = "select distinct vchParameterDesc from Onyx..SDtcSalesRegion
> where
> chOSAssignedTo = '" + strNTUser + "'"
>
> Set objConnection = Server.CreateObject("ADODB.Connection")
> objConnection.Open "EDA"
>
> Set ResultSet = objConnection.Execute(strSQL)
> %>
>
> The page fails on the "objConnection.Open EDA" line, reporting:
>
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
> 'MYDOMAIN\username'.
>
> The ODBC connection on the IIS server has the "With SQL Server
> authentication using a login ID and password entered by the user" option
> checked. I then entered a Login ID and password on the tab" This worked
> just fine in IIS 5.0 and Windows 2000 server... Why is the page trying to
> connect to the database with the users credentials, rather than those that
> I've defined in the ODBC connection?
Are you connecting to Oracle or SQL Server?
Why not use a DSN-less connection?
http://www.aspfaq.com/show.asp?id=2126
-- Tom Kaminski IIS MVP http://www.microsoft.com/windowsserver2003/community/centers/iis/ http://mvp.support.microsoft.com/ http://www.iisfaq.com/ http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS http://www.tryiis.com
- Next message: bill_at_sempf.net.nospam: "Error 450 when using MSWC.IISLOG with IIS 6.0"
- Previous message: Thomas: "OpenSSL Validation with IIS/ASP"
- In reply to: timperkins: "Weird ODBC Behavior on IIS server"
- Next in thread: timperkins: "Re: Weird ODBC Behavior on IIS server"
- Reply: timperkins: "Re: Weird ODBC Behavior on IIS server"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|