login failure in ASPNET MSDE account
Hello, guys I am getting this message when I try to fill my SqlDataAdapter using MSDE: Login failed for user 'MARS\ASPNET'.
Mars is my machine's name. I know asp.net uses the ASPNET account to work, but I'm mystified as to why this is suddenly not working. Does anyone have any ideas on what to try, tools to use to see what's going wrong? I have my MSDE instance running under Local Account, and my account <- Administrators group, VS Developers and Debuggers, so that should do it.
Incidently, my datagrid is not showing up, but my Server control button is.
Last time that happened, I just did a 'aspnet_regiis -i', but that doesn't
help this time. Please help.
Re: ASPNET MSDE account login failure
Your login failure appears to be a result of a failure on MSDE and not IIS.
You need to ensure that the account accessing the MSDE engine has a login.
Are you using SQL, Windows or integrated login?
I haven't used MSDE so I'm not sure if it gives you the option when you
install it.
Re: login failure in ASPNET MSDE account
change MSDE settings to mixed mode.
go to registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ MSSQLServer
change LoginMode to 2
Re: login failure in ASPNET MSDE account
Thank you, Zecho. I have tried that, but it does not help me.
My regedit shows this under HKEY_LOCAL_MACHINE | SOFTWARE | Microsoft |
Microsoft SQL Server | VSdotNET | MSSQLServer:
AuditLevel = 0
DefaultLogin = guest
ListenOn = SSMSSH70 SSNETLIB
LoginMode = 1
Map#=-
Map$=
Map_=\
SetHostName=0
Tapeloadwaittime=0xffffffff
I tried setting LoginMode=2, but I still get a login failure for
MARS\ASPNET.
From looking at the above settings, can anyone tell if I'm missing
something?
When I installed MSDE, I logged in as paul, a member of Administrators
group.
Also, any comments (or web pages) as to what the keys means would be much
appreciated.
Rumor has it that the MSSQL Server developer's edition is for sale at Frys
for $50. I'm thinking of getting that, just for the tools so I figure what
in the heck is going on w/my SQL Server instance.
Thanks.
Re: login failure in ASPNET MSDE account
On your computer there is an ASPNET account. Your message is due to the fact that this account, which is used when invoking aspx pages does not have access neither to MSDE nor to the DataBase of your computer.
You must grant authorization to this account to do that On Command Prompt introduce these orders :
osql -E -Q "sp_grantlogin 'COMPUTER_NAME\ASPNET'"
osql -E -d databasename -Q "sp_grantdbaccess 'COMPUTER_NAME\ASPNET'
Where computer name is your computer name, databasename is your database name.
ALternatively you can enter an order in your Web.config file
<identity impersonate="true" userName="accountname" password="password" />
where the username corresponds to a user that has access to this database, but this is less secure.