473,320 Members | 2,083 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,320 software developers and data experts.

Login failed for user\ASPNET

Kim
After installing MSDE2000 on my WIN XP machine, I created the database from
Access using the upsizing wizard. Although the tables can be seen from the
server explorer, I keep on encountering problem in building my web
application. The error message is "Login failed for user\ASPNET".

I've tried to supply/not supply a username and password at the SQL server
login but both methods could not work. I did not create a username and
password during the upsizing process although I specified a password during
installtion of the MSDE2000. I even uncheck the anonymous user option under
the IIS->Directory Seucrity but that did not help either.

What else can I do ?
Nov 19 '05 #1
3 2378
You need to add the local ASPNET user as an user in the database and grant
that user access to the DB your application is using. I don't know the command
line switches off the top of my head, so run "osql.exe /?" to get a list
of the commands.

-Brock
DevelopMentor
http://staff.develop.com/ballen
After installing MSDE2000 on my WIN XP machine, I created the database
from Access using the upsizing wizard. Although the tables can be seen
from the server explorer, I keep on encountering problem in building
my web application. The error message is "Login failed for
user\ASPNET".

I've tried to supply/not supply a username and password at the SQL
server login but both methods could not work. I did not create a
username and password during the upsizing process although I specified
a password during installtion of the MSDE2000. I even uncheck the
anonymous user option under the IIS->Directory Seucrity but that did
not help either.

What else can I do ?


Nov 19 '05 #2
Kim
This command just provide a list of switches such as -S, -d, etc. By trying
say "osql.exe /S", it tells me:

Error: no user selected. Try with -U or -E switches.

"Brock Allen" wrote:
You need to add the local ASPNET user as an user in the database and grant
that user access to the DB your application is using. I don't know the command
line switches off the top of my head, so run "osql.exe /?" to get a list
of the commands.

-Brock
DevelopMentor
http://staff.develop.com/ballen
After installing MSDE2000 on my WIN XP machine, I created the database
from Access using the upsizing wizard. Although the tables can be seen
from the server explorer, I keep on encountering problem in building
my web application. The error message is "Login failed for
user\ASPNET".

I've tried to supply/not supply a username and password at the SQL
server login but both methods could not work. I did not create a
username and password during the upsizing process although I specified
a password during installtion of the MSDE2000. I even uncheck the
anonymous user option under the IIS->Directory Seucrity but that did
not help either.

What else can I do ?


Nov 19 '05 #3
Ah, yes... so then you need to execute the SQL to add ASPNET as a login to
your DB and setup their DA permissions, etc. So launch "osql -S . -E" then
paste in this SQL and it should start working for you:

exec sp_grantlogin N'THOR\ASPNET'
exec sp_defaultdb N'THOR\ASPNET', N'pubs'
use pubs
exec sp_grantdbaccess N'THOR\ASPNET', N'ASPNET'
exec sp_addrolemember N'db_owner', N'ASPNET'

Replace THOR with your machine name and replace pubs with your database name.
One note is that this SQL adds ASPNET as dbo, so the ASPNET user has total
control over that DB. This is the fastest way to get it working, but I'd
suggest doing some research on SqlServer DB security to know how to scale
back the permissions for this user.

-Brock
DevelopMentor
http://staff.develop.com/ballen
This command just provide a list of switches such as -S, -d, etc. By
trying say "osql.exe /S", it tells me:

Error: no user selected. Try with -U or -E switches.

"Brock Allen" wrote:
You need to add the local ASPNET user as an user in the database and
grant that user access to the DB your application is using. I don't
know the command line switches off the top of my head, so run
"osql.exe /?" to get a list of the commands.

-Brock
DevelopMentor
http://staff.develop.com/ballen
After installing MSDE2000 on my WIN XP machine, I created the
database from Access using the upsizing wizard. Although the tables
can be seen from the server explorer, I keep on encountering problem
in building my web application. The error message is "Login failed
for user\ASPNET".

I've tried to supply/not supply a username and password at the SQL
server login but both methods could not work. I did not create a
username and password during the upsizing process although I
specified a password during installtion of the MSDE2000. I even
uncheck the anonymous user option under the IIS->Directory Seucrity
but that did not help either.

What else can I do ?


Nov 19 '05 #4

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: RN1 | last post by:
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...
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.