Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server connection problems with Web app
Message
From
24/10/2003 20:59:44
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
SQL Server connection problems with Web app
Miscellaneous
Thread ID:
00842544
Message ID:
00842544
Views:
38
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?
Pertti Karjalainen
Product Manager
Northern Lights Software
Fairfax, CA USA
www.northernlightssoftware.com
Next
Reply
Map
View

Click here to load this message in the networking platform