Results 1 to 5 of 5

Thread: Login failed for IUSR after IIS reinstallation

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Posts
    17

    Login failed for IUSR after IIS reinstallation

    I have Windows XP Pro SP3. I had to uninstall and reinstall IIS. The problem is that now I cannot connect to sql server 2000 from an asp page using the Internet Guest Account (IUSR) (although I changed nothing is the sql server settings, where the user ERIC\IUSR_ERIC is declared as a db_owner in my database). I am receiving this error:

    Microsoft OLE DB Provider for SQL Server (0x80040E4D)
    Login failed for user 'ERIC\IUSR_ERIC'.

    But I AM able to connect to sql server using a username and a password.
    In other words, this connection string works:

    Provider=SQLOLEDB.1;Initial Catalog=MyDB;Data Source=.;User Id=MyUser;Password=MyPass;

    and this does not work:

    Provider=SQLOLEDB.1;;Initial Catalog=MyDB;Data Source=.Integrated Security=SSPI;Persist Security Info=False

    What can I do to connect with the second connection string?

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Login failed for IUSR after IIS reinstallation

    You've mis-typed that, you seem to have put the semi-colon in the wrong place.. instead of this:
    Code:
    Provider=SQLOLEDB.1;;Initial Catalog=MyDB;Data Source=.Integrated Security=SSPI;Persist Security Info=False
    ..it should be this:
    Code:
    Provider=SQLOLEDB.1;Initial Catalog=MyDB;Data Source=.;Integrated Security=SSPI;Persist Security Info=False

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Posts
    17

    Re: Login failed for IUSR after IIS reinstallation

    Sorry, I just mistyped it here. In my page it is correct:

    Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDB;Data Source=.


    But I am still taking:

    Microsoft OLE DB Provider for SQL Server (0x80040E4D)
    Login failed for user 'ERIC\IUSR_ERIC'.

    How can I solve this?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Posts
    17

    Re: Login failed for IUSR after IIS reinstallation

    I solved it using this:
    You will need to remove and the re-insert the IUSR account back to SQL Server because after IIS was reinstalled, the new IUSR accounts will have a new SID.

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Login failed for IUSR after IIS reinstallation

    That makes sense, I can see why it would be needed - thanks for letting us know the solution.


    As you now have it sorted out, could you please do us a little favour, and mark the thread as Resolved?
    (this saves time reading for those of us who like to answer questions, and also helps those who search to find answers)

    You can do it by clicking on "Thread tools" just above the first post in this thread, then "Mark thread resolved". (like various other features of this site, you need JavaScript enabled in your browser for this to work).

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width