When I try to access SQL Server 2000 from my MM.NET app, I get the following errors:
Server Error in '/Webpermits' Application.
--------------------------------------------------------------------------------
Login failed for user 'MAIN\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 'MAIN\ASPNET'.
Source Error:
Line 22: public DataSet GetPermitsByStreetName(string bstr_name)
Line 23: {
Line 24: return this.GetDataSet("SELECT * From Permits WHERE BSTR_NAME = '" +
Line 25: bstr_name + "'");
Line 26: }
Source File: c:\webpermits\web permits business objects csharp\permits.cs Line: 24
Stack Trace:
BlahBlahBlah
***
I have the following line in web.config for Windows authentication:
add key="WebPermits\Connection" value="server=Main;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=WebPermits"
I can connect to this database just fine from Enterpise manager and ODBC manager. I wonder why it is saying specifically that "Login failed for user 'MAIN\ASPNET'.", when my Windows XP username and password are something totally different? I tried SQL server authentication, as well, but to no avail. Can't figure it out, elemental as it might be.
What might be going on here?