473,789 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error : Login failed for user 'MACHINE\ASPNET ' :/

Hello all,

I'm working with Windows XP PRO SP1, ASP.NET v2 (with
Visual Web Dev) and, MS SQL 2005 with a database with
Windows Authentication mode. I've an aspx page which must
send a query to the database. But i have this exception :

Login failed for user 'KLEO\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.Sql Client.SqlExcep tion:
Login failed for user 'KLEO\ASPNET'.

I have put TOTAL CONTROL to the ASPNET User for the
"wwwroot" folder.

What must i do to resolve this problem? Please say me step
by step since i am a novice in MSSQL & ASP.NET.

Thank your for helping!
Nov 18 '05 #1
3 4912
It has nothing to do with the directory permissions within the app. The
problem is, you're using a trusted connection to talk to the SQL server.
That meas that the ASPNet user account is the one logging into the SQL
Server. You either have to use a sql server login and not a trusted login,
or you have to set the ASPNet user to have permissions to log into the SQL
Server by adding the ASPNet account to the list of available SQL Server
users.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Mr.KisS" <an*******@disc ussions.microso ft.com> wrote in message
news:26******** *************** ******@phx.gbl. ..
Hello all,

I'm working with Windows XP PRO SP1, ASP.NET v2 (with
Visual Web Dev) and, MS SQL 2005 with a database with
Windows Authentication mode. I've an aspx page which must
send a query to the database. But i have this exception :

Login failed for user 'KLEO\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.Sql Client.SqlExcep tion:
Login failed for user 'KLEO\ASPNET'.

I have put TOTAL CONTROL to the ASPNET User for the
"wwwroot" folder.

What must i do to resolve this problem? Please say me step
by step since i am a novice in MSSQL & ASP.NET.

Thank your for helping!

Nov 18 '05 #2
On Mon, 5 Jul 2004 14:46:58 -0700, "Mr.KisS"
<an*******@disc ussions.microso ft.com> wrote:
Hello all,

I'm working with Windows XP PRO SP1, ASP.NET v2 (with
Visual Web Dev) and, MS SQL 2005 with a database with
Windows Authentication mode. I've an aspx page which must
send a query to the database. But i have this exception :

Login failed for user 'KLEO\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.Sql Client.SqlExcep tion:
Login failed for user 'KLEO\ASPNET'.

I have put TOTAL CONTROL to the ASPNET User for the
"wwwroot" folder.

What must i do to resolve this problem? Please say me step
by step since i am a novice in MSSQL & ASP.NET.


Giving control to a folder (directory) will have little effect on a
SQL Server login issue. ASPNET is using the account KLEO/ASPNET (I
would assume your PC's name is KLEO. I would also assume that this
account does not have rights to the SQL Server. Remember that the
aspnet_wp.exe program that is actually executing the application.
Several options listed below...

Give KLEO/ASPNET rights on the SQL Server box (not recommended)

Change the account that ASP.NET uses for this virtual directory to one
that has rights to the SQL Server box.

Use impersonation set in the Web.config file for the asp application,
referring to an account that has rights to the SQL Server box.
Nov 18 '05 #3
Ok, but i dont know how to change the rights of KLEO\ASPNET
for the SQL Server. How to do? I'm under MS SQL 2005
Express. There isn't an enterprise manager or visual guide.
Have you a command line or something that i could use?

Regards.
-----Original Message-----
On Mon, 5 Jul 2004 14:46:58 -0700, "Mr.KisS"
<an*******@dis cussions.micros oft.com> wrote:
Hello all,

I'm working with Windows XP PRO SP1, ASP.NET v2 (with
Visual Web Dev) and, MS SQL 2005 with a database with
Windows Authentication mode. I've an aspx page which must
send a query to the database. But i have this exception :

Login failed for user 'KLEO\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.Sql Client.SqlExcep tion:
Login failed for user 'KLEO\ASPNET'.

I have put TOTAL CONTROL to the ASPNET User for the
"wwwroot" folder.

What must i do to resolve this problem? Please say me step
by step since i am a novice in MSSQL & ASP.NET.

Giving control to a folder (directory) will have little

effect on aSQL Server login issue. ASPNET is using the account KLEO/ASPNET (Iwould assume your PC's name is KLEO. I would also assume that thisaccount does not have rights to the SQL Server. Remember that theaspnet_wp.ex e program that is actually executing the application.Several options listed below...

Give KLEO/ASPNET rights on the SQL Server box (not recommended)
Change the account that ASP.NET uses for this virtual directory to onethat has rights to the SQL Server box.

Use impersonation set in the Web.config file for the asp application,referring to an account that has rights to the SQL Server box.
.

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1145
by: Lee Falin | last post by:
>-----Original Message----- >hello, > >i am trying to write aspx login system and the login process requires a >validity check of username and password. > >i have a c# class which calls the database and checks if the username and >password is valid, but if an incorrect username or
11
4833
by: suzy | last post by:
i am trying to write aspx login system and the login process requires a validity check of username and password. i have been told that raising exception is costly, but i want a custom error message to be displayed depending on what error occurred (let's say: invalid username, invalid password, password must contain 5 or more characters, etc). at the moment, my login method is returning true/false depending on whether the login was...
1
1469
by: PABLIN | last post by:
Hello I have a problem of connection with SQL SERVER from Visual VB.NET Studio, but in WebMatrix all this good. Error: "Cannot open database requested in login 'tonet'. Login fails. Login failed for user 'ANTRAX\ASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for
1
1374
by: dk | last post by:
this is the DSN connection string in web.confi <add key="DSN" value="server=localhost;database=userDB;Integrated Security=SSPI" / any idea regarding what is causing this following error message when the connection object trys to open tia d Server Error in '/FormsAuth' Application -------------------------------------------------------------------------------
13
2285
by: Edward Mitchell | last post by:
I have a problem that involves the error I receive when attempting to complete the asp.net web application example (Walkthrough: Creating a Web Application Using a Third-Party Business Object). When I first create the SQL connection in VS.NET 2003, I test the connection and everything works fine. However, when I attempt to run the first stage of the app (the bound datagrid), I receive an error stating: login failed for user...
12
6580
by: Michael | last post by:
Please Help me. I've got a .Net 2003 program that attaches to a SQL Server machine and I'm getting the above error when a user tries to log in. The SQL server is setup to use Windows Auth. and I have added the new user to the database and have given the user access to the database for the app. But everytime I try and login using this users ID, I always get the error: Login failed for user Christian.Gaut If I login using my userid and...
0
1217
by: Don | last post by:
When I attempt to access a SQL Server database from my ASP.NET 1.1 application I get the folllowing error: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. I have impersonate set to true with the following setting in my web.config file. <identity impersonate="true" userName="" password=""/> This project had been working fine. A few weeks ago I installed Visual
2
1332
by: Tim Zych | last post by:
When I try to connect to a sql server database using Windows Authentication, I get a message that the login failed: Cannot open database "codelib" requested by the login. The login failed. Login failed for user ABCD\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.
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6761
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.