Login failed for user 'machinename\ASPNET'

Discussion in 'ASP .Net' started by =?Utf-8?B?TWFuZGFyIFBhdGls?=, May 26, 2004.

  1. H
    I am getting following error
    Login failed for user 'machinename\ASPNET
    when tryiong to do the following:
    SqlDataAdapter1.Fill(DataSet11
    This user is never specified in the database and never mentioned anywhere in the code. I am creating sqldataadapter with wizard in VB Dot net 200
    Regard
     
    =?Utf-8?B?TWFuZGFyIFBhdGls?=, May 26, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?TWFuZGFyIFBhdGls?=

    Cowboy Guest

    Sounds like you are using Windows Security on your SQL Server instead of
    mixed mode. In this instance, it would take the logged in user and attempt
    to log on to SQL as that person. YOu would then get this error.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ************************************************
    Think Outside the Box!
    ************************************************
    "Mandar Patil" <> wrote in message
    news:...
    > Hi
    > I am getting following error:
    > Login failed for user 'machinename\ASPNET'
    > when tryiong to do the following:
    > SqlDataAdapter1.Fill(DataSet11)
    > This user is never specified in the database and never mentioned anywhere

    in the code. I am creating sqldataadapter with wizard in VB Dot net 2003
    > Regards
    >
     
    Cowboy, May 26, 2004
    #2
    1. Advertising

  3. ASPNET is not user on the machine and machinename\ASPNET is also not the SQL server instance.
     
    =?Utf-8?B?TWFuZGFy?=, May 26, 2004
    #3
  4. The ASPNET account is the default user for ASPNET.

    Are you trying to connect to the database with Integrated security, or do
    you specify a username/pass.

    If you try to use integrated security and you have anonymous access turned
    on, it will use the ASPNET account to try to connect to SQL Server. Try
    specifing a UserName/Password.

    IE.

    packet size=4096;integrated security=SSPI;data source=dhurley3;persist
    security info=False;initial catalog=Northwind

    or

    packet size=4096;user id=sa;data source=dhurley3;persist security
    info=False;initial catalog=Northwind;password=pass;

    Hope this helps.

    "Mandar Patil" <> wrote in message
    news:...
    > Hi
    > I am getting following error:
    > Login failed for user 'machinename\ASPNET'
    > when tryiong to do the following:
    > SqlDataAdapter1.Fill(DataSet11)
    > This user is never specified in the database and never mentioned anywhere

    in the code. I am creating sqldataadapter with wizard in VB Dot net 2003
    > Regards
    >
     
    Donald E. Hurley Jr., May 26, 2004
    #4
  5. =?Utf-8?B?TWFuZGFyIFBhdGls?=

    Jeff Dillon Guest

    That is the problem. Add this user logon to SQL Server

    "Mandar" <> wrote in message
    news:...
    > ASPNET is not user on the machine and machinename\ASPNET is also not the

    SQL server instance.
     
    Jeff Dillon, May 26, 2004
    #5
  6. =?Utf-8?B?TWFuZGFyIFBhdGls?=

    Scott Allen Guest

    Mandar:

    In this case you have several options:

    - use a "mirrored" local account on the SQL machine, meaning you'll
    create an ASPNET account on the SQL machine, synchronize passwords for
    the ASPNET account on the web server and SQL machine, and give the
    ASPNET account the ability to login to SQL. There is a more detailed
    description of how to do this in the following document:

    Building Secure ASP.NET Applications: Authentication, Authorization,
    and Secure Communication
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT01.asp

    - run the ASP.NET worker process in the context of a user who can
    access SQL

    - use mixed mode authentication (pass a uid and password in the
    connection string)

    HTH,

    --
    Scott
    http://www.OdeToCode.com

    On Wed, 26 May 2004 13:21:13 -0700, Mandar
    <> wrote:

    >ASPNET is not user on the machine and machinename\ASPNET is also not the SQL server instance.
     
    Scott Allen, May 27, 2004
    #6
  7. Thanks
    I changed the sql server authentication to SQL authentication
    Mandar
     
    =?Utf-8?B?TWFuZGFy?=, May 27, 2004
    #7
    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. Linda
    Replies:
    3
    Views:
    603
    =?Utf-8?B?UGF1bA==?=
    Oct 24, 2004
  2. =?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,499
    =?Utf-8?B?cHNoaXVl?=
    Oct 24, 2004
  3. Jon   Paal
    Replies:
    4
    Views:
    492
    Juan T. Llibre
    Nov 29, 2006
  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:
    129
    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:
    161
Loading...

Share This Page