IIS and SQL Server Persmission Issue
I am getting an error trying to run a SQL Server SELECT statement from an
ASP Application.
I am learning ASP/IIS/SQL Server by writing a small ASP app in Dreamweaver.
I've created and tested the ODBC connection just fine. And when I create the
connection in Dreamweaver and run the query it works just fine. However when
I try to access the web page I get:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'ATBSLAPTOP\IUSR_ATBSLAPTOP'.
/webprodmx/categories.asp, line 9
Code is:
Dim MM_webprodmx_STRING
MM_webprodmx_STRING = "dsn=DSNwebprodmxSQL;uid=IUSR_ATBSLAPTOP;
Set rsCategories = Server.CreateObject("ADODB.Recordset")
9: rsCategories.ActiveConnection = MM_webprodmx_STRING
rsCategories.Source = "SELECT * FROM dbo.categories ORDER BY category ASC"
rsCategories.CursorType = 0
The DSN is defined and working (testing outside of dreamweaver, via setup
directly). The database and table exist and have data present. Like I said
it works everyplace else except when going through IIS. I have read some of
the MS Support articles and made sure I am accessing my machine via (local)
so there is no network access. Everything is running on my single local
machine - even IIS and SQL Server 2000.
Any suggestions would be appreciated.
"Patrick24601" <patrick24601@.yahoo.com> wrote in message
news:ePPTc.4368$wu.1124@.okepread04...
> IIS and SQL Server Persmission Issue
> I am getting an error trying to run a SQL Server SELECT statement from an
> ASP Application.
> I am learning ASP/IIS/SQL Server by writing a small ASP app in
Dreamweaver.
> I've created and tested the ODBC connection just fine. And when I create
the
> connection in Dreamweaver and run the query it works just fine. However
when
> I try to access the web page I get:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
> 'ATBSLAPTOP\IUSR_ATBSLAPTOP'.
> /webprodmx/categories.asp, line 9
Your DSN is set up to use integrated authentication. Change that or give
'ATBSLAPTOP\IUSR_ATBSLAPTOP' rights to connect you your database. It works
outside of IIS because then it's you, not 'ATBSLAPTOP\IUSR_ATBSLAPTOP'
connecting to the database.
David
|||Thanks David.
I've gone in and check and that user has SELECT/INSERT/DELETE permissions on
all of the needed tables.
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:%23mp8$gwgEHA.384@.TK2MSFTNGP10.phx.gbl...
> "Patrick24601" <patrick24601@.yahoo.com> wrote in message
> news:ePPTc.4368$wu.1124@.okepread04...
> Dreamweaver.
> the
> when
> Your DSN is set up to use integrated authentication. Change that or give
> 'ATBSLAPTOP\IUSR_ATBSLAPTOP' rights to connect you your database. It
> works
> outside of IIS because then it's you, not 'ATBSLAPTOP\IUSR_ATBSLAPTOP'
> connecting to the database.
> David
>
|||Thanks all for your responses on this.
What I ended up doing (although maybe not the best solution) is to create an
explicitly new userid on the SQL server and use that for everything.
Patrick
"Patrick24601" <patrick24601@.yahoo.com> wrote in message
news:ePPTc.4368$wu.1124@.okepread04...
> IIS and SQL Server Persmission Issue
> I am getting an error trying to run a SQL Server SELECT statement from an
> ASP Application.
> I am learning ASP/IIS/SQL Server by writing a small ASP app in
> Dreamweaver. I've created and tested the ODBC connection just fine. And
> when I create the connection in Dreamweaver and run the query it works
> just fine. However when I try to access the web page I get:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
> 'ATBSLAPTOP\IUSR_ATBSLAPTOP'.
> /webprodmx/categories.asp, line 9
> Code is:
> Dim MM_webprodmx_STRING
> MM_webprodmx_STRING = "dsn=DSNwebprodmxSQL;uid=IUSR_ATBSLAPTOP;
> Set rsCategories = Server.CreateObject("ADODB.Recordset")
> 9: rsCategories.ActiveConnection = MM_webprodmx_STRING
> rsCategories.Source = "SELECT * FROM dbo.categories ORDER BY category ASC"
> rsCategories.CursorType = 0
> The DSN is defined and working (testing outside of dreamweaver, via setup
> directly). The database and table exist and have data present. Like I said
> it works everyplace else except when going through IIS. I have read some
> of the MS Support articles and made sure I am accessing my machine via
> (local) so there is no network access. Everything is running on my single
> local machine - even IIS and SQL Server 2000.
> Any suggestions would be appreciated.
>
No comments:
Post a Comment