Login failed for user 'machinename\ASPNET'.

Discussion in 'ASP .Net' started by Jon Paal, Nov 29, 2006.

  1. Jon   Paal

    Jon Paal Guest

    how does this get resolved ???

    "Cannot open user default database. Login failed.
    Login failed for user 'machinename\ASPNET'. "
     
    Jon Paal, Nov 29, 2006
    #1
    1. Advertising

  2. 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:%...
    >
    > how does this get resolved ???
    >
    > "Cannot open user default database. Login failed.
    > Login failed for user 'machinename\ASPNET'. "
    >
     
    Mark Fitzpatrick, Nov 29, 2006
    #2
    1. Advertising

  3. Jon   Paal

    mc Guest

    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
     
    mc, Nov 29, 2006
    #3
  4. Jon   Paal

    Steve B. Guest

    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" <> a écrit dans le message de news:
    ...
    > 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:%...
    >>
    >> how does this get resolved ???
    >>
    >> "Cannot open user default database. Login failed.
    >> Login failed for user 'machinename\ASPNET'. "
    >>

    >
    >
     
    Steve B., Nov 29, 2006
    #4
  5. 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 español : http://asp.net.do/foros/
    ===================================
    "Steve B." <_swap_msn_and_com> wrote in message
    news:...
    > 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" <> a écrit dans le message de news:
    > ...
    >> 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:%...
    >>>
    >>> how does this get resolved ???
    >>>
    >>> "Cannot open user default database. Login failed.
    >>> Login failed for user 'machinename\ASPNET'. "
    >>>

    >>
    >>

    >
    >
     
    Juan T. Llibre, Nov 29, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWFuZGFyIFBhdGls?=

    Login failed for user 'machinename\ASPNET'

    =?Utf-8?B?TWFuZGFyIFBhdGls?=, May 26, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    10,127
    =?Utf-8?B?TWFuZGFy?=
    May 27, 2004
  2. Linda
    Replies:
    3
    Views:
    616
    =?Utf-8?B?UGF1bA==?=
    Oct 24, 2004
  3. =?Utf-8?B?cHNoaXVl?=

    Login failed for user 'MachineName\ASPNET

    =?Utf-8?B?cHNoaXVl?=, Oct 24, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,505
    =?Utf-8?B?cHNoaXVl?=
    Oct 24, 2004
  4. Carmen de Lara

    Login failed for user 'machineName\ASPNET'. 18456

    Carmen de Lara, Jul 3, 2004, in forum: ASP .Net Security
    Replies:
    2
    Views:
    138
    Carmen de Lara
    Sep 23, 2004
  5. Paul

    Login failed for user 'MachineName\ASPNET

    Paul, Oct 23, 2004, in forum: ASP .Net Security
    Replies:
    1
    Views:
    172
Loading...

Share This Page