Can't Login SQL from ASP.NET applications

H

Herr Lucifer

I have SQL 2000 installed and it works fine with windows applications on my
hard drive. The problem is that I can't access the same databases with the
same login permission from a web application ( using NT integrated
authority). The error says:
Login failed for user 'HERRLUCIFER\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
'HERRLUCIFER\ASPNET'.

Line 110: 'Put user code to initialize the page here
Line 111: If Not Me.IsPostBack Then
Line 112: DACustomers.Fill(DsCustomerNames1, "Customers")
<<---error (red) line
Line 113: DataGrid1.DataBind()
Line 114: End If
 
R

Riki

Herr said:
I have SQL 2000 installed and it works fine with windows applications
on my hard drive. The problem is that I can't access the same
databases with the same login permission from a web application (
using NT integrated authority). The error says:
Login failed for user 'HERRLUCIFER\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 'HERRLUCIFER\ASPNET'.

Line 110: 'Put user code to initialize the page here
Line 111: If Not Me.IsPostBack Then
Line 112: DACustomers.Fill(DsCustomerNames1, "Customers")
<<---error (red) line
Line 113: DataGrid1.DataBind()
Line 114: End If

2 solutions:
1) Add the ASPNET user as a login to your SQL Server, and give it
access to your database.
2) Turn impersonation on in web.config and run your application
with the identity of the logged on user.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top