PC Review


Reply
Thread Tools Rate Thread

Can't Login SQL from ASP.NET applications

 
 
Herr Lucifer
Guest
Posts: n/a
 
      7th Feb 2005
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
----------
PSWebRoot is on a FAT32 drive + Framework 1.4 + VS 2003 + XP-SP2)


 
Reply With Quote
 
 
 
 
Riki
Guest
Posts: n/a
 
      7th Feb 2005
Herr Lucifer" <"\n wrote:
> 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
> ----------
> PSWebRoot is on a FAT32 drive + Framework 1.4 + VS 2003 + XP-SP2)


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.

--

Riki


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set up login to run two applications only =?Utf-8?B?REw=?= Windows XP Security 1 26th Jul 2006 05:46 AM
Launch selected applications automatically at user login =?Utf-8?B?RGlldGVyIFNjaGxlZ2Vs?= Windows XP General 3 4th May 2006 04:15 AM
Can't Login SQL from ASP.NET applications Herr Lucifer Microsoft Dot NET 1 7th Feb 2005 08:11 AM
Can't Login SQL from ASP.NET applications Herr Lucifer Microsoft ASP .NET 1 7th Feb 2005 08:11 AM
Installed PCs using RIS. But when I use a user to login, the applications cannot Elmo Windows XP Setup 0 1st Aug 2003 11:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:52 AM.