469,927 Members | 1,717 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

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 2242
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Matthew Louden | last post: by
4 posts views Thread by Chuck Bowling | last post: by
12 posts views Thread by Michael | last post: by
11 posts views Thread by Anil Gupte | last post: by
4 posts views Thread by RN1 | last post: by
4 posts views Thread by Brett | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.