Saturday, March 24, 2012

Login failed for user 'machinename\ASPNET'.

how does this get resolved ?
"Cannot open user default database. Login failed.
Login failed for user 'machinename\ASPNET'. "You either grant the ASPNET user account access to the SQL database (which I
don't like to do) or you can use a connectionstring that is not set to use a
trusted connection so you can pass it a sql login username and password.
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199...2006
"Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message
news:%23HPtuA5EHHA.2464@.TK2MSFTNGP06.phx.gbl...
> how does this get resolved ?
> "Cannot open user default database. Login failed.
> Login failed for user 'machinename\ASPNET'. "
>
Mark Fitzpatrick wrote:
> You either grant the ASPNET user account access to the SQL database (which
I
> don't like to do) or you can use a connectionstring that is not set to use
a
> trusted connection so you can pass it a sql login username and password.
>
If your deploying to an intranet you could also consider impersonation
Create an application pool in IIS with a specific account. Set your
application to use this app pool and give acess to this user to the SQL
Server db. In this scenario, you will be able to control the behaviour of
your web app, and you won't have to provide any apssword in the web.config
file.
Steve
"Mark Fitzpatrick" <markfitz@.fitzme.com> a crit dans le message de news:
OwDVCO5EHHA.4052@.TK2MSFTNGP02.phx.gbl...
> You either grant the ASPNET user account access to the SQL database (which
> I don't like to do) or you can use a connectionstring that is not set to
> use a trusted connection so you can pass it a sql login username and
> password.
>
> --
> Hope this helps,
> Mark Fitzpatrick
> Former Microsoft FrontPage MVP 199...2006
> "Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message
> news:%23HPtuA5EHHA.2464@.TK2MSFTNGP06.phx.gbl...
>
re:
> Create an application pool in IIS with a specific account.
He can't do that, Steve.
He's using IIS 5 or 5.1 if his default ASP.NET account is ASPNET,
and neither of those use Application pools. Only IIS 6.0 uses App Pools.
Mark's suggestion will work for Jon.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Steve B." <steve_beauge@.com.msn_swap_msn_and_com> wrote in message
news:ukMqI77EHHA.140@.TK2MSFTNGP06.phx.gbl...
> Create an application pool in IIS with a specific account. Set your applic
ation to use this app
> pool and give acess to this user to the SQL Server db. In this scenario, y
ou will be able to
> control the behaviour of your web app, and you won't have to provide any a
pssword in the
> web.config file.
>
> Steve
> "Mark Fitzpatrick" <markfitz@.fitzme.com> a crit dans le message de news:
> OwDVCO5EHHA.4052@.TK2MSFTNGP02.phx.gbl...
>

0 comments:

Post a Comment