My website runs fine in WebMatrix, using the MSDE database. When I try to run it 'live' on the IIS server I get the error below. The following describes my environment:
- IIS 6.0 and SQL Server 2002 both running on the same server.
- This server is also running as a terminal server.
- I am using "trusted_connection=true" in my connection string.
- mydomain\ASPNET is a domain user with full rights to that server and database.
- I have explicitly given ASPNET rights to the website in IIS, and to the database in SQL Server.
- I can login to the server as ASPNET and access the website folder, and all tables in the database.
- As ASPNET, I can run the website in WebMatrix, but not the 'live' version.
Question: should ASPNET just be a local user to that server instead of a domain user ? Since the error message (see below) says "'myservername\ASPNET" and not "mydomain\ASPNET" I'm thinking that may be the case. However, I'm pretty sure I already tried this before we made it a domain user.
Any help would be greatly appreciated, as I've been struggling with this for a couple of weeks now. Thanks!!!
--------------------------------------------------------------------------------
Server Error in '/' Application.
Login failed for user 'myservername\ASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'myservername\ASPNET'.
Source Error:
Line 40: dataAdapter.SelectCommand = dbCommand
Line 41: Dim dataSet As System.Data.DataSet = New System.Data.DataSet
Line 42: dataAdapter.Fill(dataSet) <== Highlighted as the line that caused the error
Line 43:
Line 44: Return dataSet