SQL Server 2005 - how do i create the ASPNET user?

Discussion in 'ASP .Net' started by SpaceMarine, Feb 15, 2008.

  1. SpaceMarine

    SpaceMarine Guest

    ok im new to SQL Server 2005, from 2000.

    my webapps use integrated security, and run under:

    \\MYMACHINE\ASPNET

    ....in 2000 it was a pretty simple thing to create a new db user for
    this user. took 10 seconds to click thru and do it.

    but in SQL 2005, i just cant seem to figure it out. in the Management
    Studio i go to the Security->User folder and try to add a new user..
    but when i browse around for \\MYMACHINE\ASPNET, i just cant find it
    anywhere.

    am i going about this incorrectly?


    thanks!
    sm
    SpaceMarine, Feb 15, 2008
    #1
    1. Advertising

  2. SpaceMarine

    SpaceMarine Guest

    btw i should add...

    i can create a db user called "ASPNET", but i cant associate it to the
    MYMACHINE\ASPNET login.


    sm
    SpaceMarine, Feb 15, 2008
    #2
    1. Advertising

  3. SpaceMarine

    SpaceMarine Guest

    On Feb 15, 5:51 pm, SpaceMarine <> wrote:

    > i can create a db user called "ASPNET", but i cant associate it to the
    > MYMACHINE\ASPNET login.


    well, running this sql sorta worked:

    CREATE USER [ASPNET] FOR LOGIN [MYMACHINE\ASPNET]

    ....but my app still returns the beloved "Login failed for user
    'MYMACHINE\ASPNET'" error when i run it via IIS. (if i run it via
    VS.NET 2005's internal web server, it works).

    still trying to figure it out.


    sm
    SpaceMarine, Feb 15, 2008
    #3
  4. SpaceMarine

    SpaceMarine Guest

    On Feb 15, 5:57 pm, SpaceMarine <> wrote:
    > On Feb 15, 5:51 pm, SpaceMarine <> wrote:
    >
    > > i can create a db user called "ASPNET", but i cant associate it to the
    > > MYMACHINE\ASPNET login.

    >
    > well, running this sql sorta worked:
    >
    > CREATE USER [ASPNET] FOR LOGIN [MYMACHINE\ASPNET]
    >
    > ...but my app still returns the beloved "Login failed for user
    > 'MYMACHINE\ASPNET'" error when i run it via IIS. (if i run it via
    > VS.NET 2005's internal web server, it works).
    >
    > still trying to figure it out.


    ....any clues on this? havent been able to figure it out.


    thanks,
    sm
    SpaceMarine, Feb 18, 2008
    #4
  5. SpaceMarine

    SpaceMarine Guest

    On Feb 18, 10:35 am, SpaceMarine <> wrote:
    > > well, running this sql sorta worked:

    >
    > > CREATE USER [ASPNET] FOR LOGIN [MYMACHINE\ASPNET]

    >
    > > ...but my app still returns the beloved "Login failed for user
    > > 'MYMACHINE\ASPNET'" error when i run it via IIS. (if i run it via
    > > VS.NET 2005's internal web server, it works).

    >
    > > still trying to figure it out.


    got it -- i had to create the *login* in the database's Security
    section, and then i could create a *user* based on that login.

    no mo' error.


    sm
    SpaceMarine, Feb 20, 2008
    #5
  6. SpaceMarine

    Lars Guest

    Hi

    You do it from the Visual Studio environment.

    For Visual Studio 2008/2005
    Simply you open a page on the site you are creating and from that page you
    can add, manage and delete users and roles. I don't know how you reach this
    site from outside the IDE. But I think you have to edit the database
    ASPNETDB.MDF to add users and roles (I guess).

    Check out the free instruction video from www.LearnVisualStudio.net . It's
    awesome.

    http://www.learnvisualstudio.net/content/Samples/vwd_09cs.htm


    Lars


    "SpaceMarine" <> skrev i meddelandet
    news:...
    > On Feb 18, 10:35 am, SpaceMarine <> wrote:
    >> > well, running this sql sorta worked:

    >>
    >> > CREATE USER [ASPNET] FOR LOGIN [MYMACHINE\ASPNET]

    >>
    >> > ...but my app still returns the beloved "Login failed for user
    >> > 'MYMACHINE\ASPNET'" error when i run it via IIS. (if i run it via
    >> > VS.NET 2005's internal web server, it works).

    >>
    >> > still trying to figure it out.

    >
    > got it -- i had to create the *login* in the database's Security
    > section, and then i could create a *user* based on that login.
    >
    > no mo' error.
    >
    >
    > sm
    Lars, Feb 20, 2008
    #6
  7. SpaceMarine

    SpaceMarine Guest

    On Feb 20, 4:10 pm, "Lars" <> wrote:
    > You do it from the Visual Studio environment.
    >
    > For Visual Studio 2008/2005
    > Simply you open a page on the site you are creating and from that page you
    > can add, manage and delete users and roles. I don't know how you reach this
    > site from outside the IDE. But I think you have to edit the database
    > ASPNETDB.MDF to add users and roles (I guess).


    i believe you are referring to the ASP.NET site's usernames & roles,
    which are not related to SQL Server instance's login & users.


    sm
    SpaceMarine, Feb 21, 2008
    #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. Juan T. Llibre
    Replies:
    0
    Views:
    455
    Juan T. Llibre
    Jun 7, 2005
  2. farseer

    SQL Server 2005 + SQL Server Express

    farseer, Aug 7, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    344
    farseer
    Aug 8, 2006
  3. Bogdan Jokel
    Replies:
    0
    Views:
    776
    Bogdan Jokel
    Jan 15, 2010
  4. Wesley Chen
    Replies:
    0
    Views:
    223
    Wesley Chen
    Apr 7, 2009
  5. Wesley Chen
    Replies:
    9
    Views:
    243
    Sean O'Halpin
    Apr 14, 2009
Loading...

Share This Page