473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Login Failed

RN1
I am working on WinXP Pro SP3, .NET 2.0 & SQL Server 2005 (Windows
Authentication). When I run a ASPX page that connects to SQL Server,
the following error gets generated:

Login failed for user 'RON\ASPNET'

where RON is my machine name. I came across a few posts which
suggested adding RON\ASPNET as a User in SQL Server Management Studio
Express (under Security--->Logins node). I did so but that didn't
resolve the problem.

Can someone please advice me how do I overcome this problem?

BTW, is Windows Authentication more secure or SQL Server
Authentication? Under what circumstances should one be preferred over
the other?

Thanks.
Jun 27 '08 #1
4 2006
Are you sure you specified Windows authentication in your connection string?

Windows Authentication is more secure for an obvious reason that you don't
need to store and to pass the password.

You may also consider impersonating the ASPNET account as some other
account. It may help you in troubleshooting.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"RN1" <rn**@rediffmail.comwrote in message
news:19**********************************@w34g2000 prm.googlegroups.com...
>I am working on WinXP Pro SP3, .NET 2.0 & SQL Server 2005 (Windows
Authentication). When I run a ASPX page that connects to SQL Server,
the following error gets generated:

Login failed for user 'RON\ASPNET'

where RON is my machine name. I came across a few posts which
suggested adding RON\ASPNET as a User in SQL Server Management Studio
Express (under Security--->Logins node). I did so but that didn't
resolve the problem.

Can someone please advice me how do I overcome this problem?

BTW, is Windows Authentication more secure or SQL Server
Authentication? Under what circumstances should one be preferred over
the other?

Thanks.

Jun 27 '08 #2
Sounds like an issue with your connection string. I would study that.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"RN1" <rn**@rediffmail.comwrote in message
news:19**********************************@w34g2000 prm.googlegroups.com...
>I am working on WinXP Pro SP3, .NET 2.0 & SQL Server 2005 (Windows
Authentication). When I run a ASPX page that connects to SQL Server,
the following error gets generated:

Login failed for user 'RON\ASPNET'

where RON is my machine name. I came across a few posts which
suggested adding RON\ASPNET as a User in SQL Server Management Studio
Express (under Security--->Logins node). I did so but that didn't
resolve the problem.

Can someone please advice me how do I overcome this problem?

BTW, is Windows Authentication more secure or SQL Server
Authentication? Under what circumstances should one be preferred over
the other?

Thanks.
Jun 27 '08 #3
re:
!the following error gets generated:
!Login failed for user 'RON\ASPNET'
!where RON is my machine name. I came across a few posts which

You need to add RON\ASPNET as a login to SQL Server 2005
and specify that login as a user of your database.

re:
!I came across a few posts which suggested adding RON\ASPNET as a User
!in SQL Server Management Studio Express (under Security--->Logins node).
!I did so but that didn't resolve the problem.

Adding the login is not enough.
You must also add the login name to the users for your database.

re:
!BTW, is Windows Authentication more secure or SQL Server Authentication?
!Under what circumstances should one be preferred over the other?

I prefer to use SQL Server authentication.
That way, I can use an ad-hoc user to authenticate.

Ymmv...

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"RN1" <rn**@rediffmail.comwrote in message news:19**********************************@w34g2000 prm.googlegroups.com...
>I am working on WinXP Pro SP3, .NET 2.0 & SQL Server 2005 (Windows
Authentication). When I run a ASPX page that connects to SQL Server,
the following error gets generated:

Login failed for user 'RON\ASPNET'

where RON is my machine name. I came across a few posts which
suggested adding RON\ASPNET as a User in SQL Server Management Studio
Express (under Security--->Logins node). I did so but that didn't
resolve the problem.

Can someone please advice me how do I overcome this problem?

BTW, is Windows Authentication more secure or SQL Server
Authentication? Under what circumstances should one be preferred over
the other?

Thanks.

Jun 27 '08 #4
RN1
On Jun 23, 10:31*pm, "Juan T. Llibre" <nomailrepl...@nowhere.com>
wrote:
re:
!the following error gets generated:
!Login failed for user 'RON\ASPNET'
!where RON is my machine name. I came across a few posts which

You need to add RON\ASPNET as a login to SQL Server 2005
and specify that login as a user of your database.

re:
!I came across a few posts which suggested adding RON\ASPNET as a User
!in SQL Server Management Studio Express (under Security--->Logins node).
!I did so but that didn't resolve the problem.

Adding the login is not enough.
You must also add the login name to the users for your database.

re:
!BTW, is Windows Authentication more secure or SQL Server Authentication?
!Under what circumstances should one be preferred over the other?

I prefer to use SQL Server authentication.
That way, I can use an ad-hoc user to authenticate.

Ymmv...

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
======================================

"RN1" <r...@rediffmail.comwrote in messagenews:19**********************************@w 34g2000prm.googlegroups.com...
I am working on WinXP Pro SP3, .NET 2.0 & SQL Server 2005 (Windows
Authentication). When I run a ASPX page that connects to SQL Server,
the following error gets generated:
Login failed for user 'RON\ASPNET'
where RON is my machine name. I came across a few posts which
suggested adding RON\ASPNET as a User in SQL Server Management Studio
Express (under Security--->Logins node). I did so but that didn't
resolve the problem.
Can someone please advice me how do I overcome this problem?
BTW, is Windows Authentication more secure or SQL Server
Authentication? Under what circumstances should one be preferred over
the other?
Thanks.- Hide quoted text -

- Show quoted text -
Thanks friends for your suggestions.
>Adding the login is not enough.
You must also add the login name to the users for your database.
Yes...yes...that's where I was erring. I didn't add the login name to
the users for the database. After adding that login, I can now connect
& retrieve data from the database.

Thanks once again,

Regards.
Jun 27 '08 #5

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

Similar topics

5
by: Matthew Louden | last post by:
I wrote ASP.NET application that access SQL Server database. When I run the application, it yields "Login failed for user '<COMPUTER_NAME>\ASPNET'" error message. I then did the following, but...
4
by: rrober07 | last post by:
Hello, My Setup is I have a Web Server machine(Devweb01), Database SQL Machine(Devsql01), a Client Machine(local machine) I have configured the SQL machine as follows: 1) Added local Aspnet...
3
by: Maellic | last post by:
Hi, The website I am working on is built with ASP.NET and connects to a SQL Server 2000 database. The web server and database are on the same machine. I have recently tried to modify the timeout...
4
by: Chuck Bowling | last post by:
I'm having a problem that i really don't understand. I'm new to ASP.NET and to SQL Server (MSDE). I'm trying to get a VS walkthru in the C# to work. I think the problem is permissions but I'm not...
12
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...
5
by: Ramtin | last post by:
Hi; when I use sql server connection or ole connection for working with database I receive the login failed for user 'any user that I work'.I've been granted ASPNET user in sql.
10
by: BLUE | last post by:
I'm using SQL Server 2005 Developer Edition on Windows XP SP2 with this setting: <add name="SqlServerTrustedConn" providerName="System.Data.SqlClient" connectionString="Data...
11
by: Anil Gupte | last post by:
I am getting the following error: ********* Login failed for user 'AUM\ASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the...
4
by: Brett | last post by:
I have an ASP.NET 2.0 application that uses Forms Authentication. The startup page contains just a login control, and the site works well on an IIS 6 web server. I am now setting the site up on...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.