Wednesday, March 28, 2012

Login failed for user computername\ASPNET

Hi all,
I get the error message Login failed for user 'computername\ASPNET'
when trying to log to MSDE 2000 SP 3 with .NET application.
My computer is Windows 2000 + SP4 with latest security patches.
I have tried to set the permissions to the database I am connecting
(mydatabase) with script:
sp_grantlogin 'mycomputer\ASPNET'
go
use mydatabase
go
sp_grantdbaccess 'mycomputer\ASPNET'
go
sp_addrolemember 'db_owner', 'mycomputer\ASPNET'
go
Still the error comes.
Does anybody have ideas what to try next.
PS. Software reinstall has been tried (.NET framework 1.1, MSDE).
Regards
Jarmo
Hi,
Did you logged into your machine using 'mycomputer\ASPNET' ? If not login to
the machine using 'mycomputer\ASPNET' and try
connecting using OSQL and confirm.
Thanks
Hari
MCDBA
"jarmopy" <jarmo.pyorny@.luukku.com> wrote in message
news:5d70b654.0408152138.6ca4d0d8@.posting.google.c om...
> Hi all,
> I get the error message Login failed for user 'computername\ASPNET'
> when trying to log to MSDE 2000 SP 3 with .NET application.
> My computer is Windows 2000 + SP4 with latest security patches.
> I have tried to set the permissions to the database I am connecting
> (mydatabase) with script:
>
> sp_grantlogin 'mycomputer\ASPNET'
> go
> use mydatabase
> go
> sp_grantdbaccess 'mycomputer\ASPNET'
> go
> sp_addrolemember 'db_owner', 'mycomputer\ASPNET'
> go
> Still the error comes.
> Does anybody have ideas what to try next.
> PS. Software reinstall has been tried (.NET framework 1.1, MSDE).
> Regards
> Jarmo
|||Hi Hari,
Local policy does not allow to log in as aspnet:
"The local policy of this system does not permit you to logon interactively."
It is only permitted to log on as a batch job.
Regards
Jarmo
"Hari Prasad" wrote:

> Hi,
> Did you logged into your machine using 'mycomputer\ASPNET' ? If not login to
> the machine using 'mycomputer\ASPNET' and try
> connecting using OSQL and confirm.
> Thanks
> Hari
> MCDBA
>
|||Hi again,
I changed the policy to be able to log in.
When giving the command as mycomputer\aspnet user
osql -E -S mycomputer\myinstance
I get the same error message:
Login failed.
Regards
Jarmo
|||There is no need to log in as ASPNET account
Go to MSDN site and look in SQL SERVER 2000 SDK Documentation (it is valid
for MSDE)
There is explanation how to use ASP .NET applications with SQL Server
"jarmopy" <jarmo.pyorny@.luukku.com> wrote in message
news:5d70b654.0408152138.6ca4d0d8@.posting.google.c om...
> Hi all,
> I get the error message Login failed for user 'computername\ASPNET'
> when trying to log to MSDE 2000 SP 3 with .NET application.
> My computer is Windows 2000 + SP4 with latest security patches.
> I have tried to set the permissions to the database I am connecting
> (mydatabase) with script:
>
> sp_grantlogin 'mycomputer\ASPNET'
> go
> use mydatabase
> go
> sp_grantdbaccess 'mycomputer\ASPNET'
> go
> sp_addrolemember 'db_owner', 'mycomputer\ASPNET'
> go
> Still the error comes.
> Does anybody have ideas what to try next.
> PS. Software reinstall has been tried (.NET framework 1.1, MSDE).
> Regards
> Jarmo
|||Hi,
thanks for the answers.
This seems to be a problem only in one computer.
In other machines this is working OK.

No comments:

Post a Comment