"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 comwrote in message
news:%23HPtuA5EHHA.2464@.TK2MSFTNGP06.phx.gbl...
Quote:
Originally Posted by
>
how does this get resolved ?
>
"Cannot open user default database. Login failed.
Login failed for user 'machinename\ASPNET'. "
>
Mark Fitzpatrick wrote:
Quote:
Originally Posted by
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.coma crit dans le message de news:
OwDVCO5EHHA.4052@.TK2MSFTNGP02.phx.gbl...
Quote:
Originally Posted by
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 comwrote in message
news:%23HPtuA5EHHA.2464@.TK2MSFTNGP06.phx.gbl...
Quote:
Originally Posted by
>>
>how does this get resolved ?
>>
>"Cannot open user default database. Login failed.
>Login failed for user 'machinename\ASPNET'. "
>>
>
>
re:
Quote:
Originally Posted by
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_comwrote in message
news:ukMqI77EHHA.140@.TK2MSFTNGP06.phx.gbl...
Quote:
Originally Posted by
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.coma crit dans le message de news:
OwDVCO5EHHA.4052@.TK2MSFTNGP02.phx.gbl...
Quote:
Originally Posted by
>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 comwrote in message
>news:%23HPtuA5EHHA.2464@.TK2MSFTNGP06.phx.gbl...
Quote:
Originally Posted by
>>>
>>how does this get resolved ?
>>>
>>"Cannot open user default database. Login failed.
>>Login failed for user 'machinename\ASPNET'. "
>>>
>>
>>
>
>
0 comments:
Post a Comment