locked
SQL Server Login Failed With IIS7 RRS feed

  • Question

  • User-1966295144 posted

    The SQL Server login failed with IIS7 (through Internet Explorer) but succeeded with Visual Studio .NET 2008 Web Server.

     

    The ASP.NET page was reachable, then username and password were entered to their text boxes respectively.  The button to validate the account on SQL Server on company server was clicked and "Login Failed" error was encountered.

    Sometimes, near .Open and sometimes near .ExecuteReader.

    Firewall on the development PC has been turned off.  UAC is enabled.  Full permission (to everyone) is already given for IIS7 binary folders.

    What else can be done?

    Wednesday, January 30, 2013 8:46 AM

Answers

  • User-1315512054 posted

    Hello,

    It seems as permission issue as you have Admin in VS and Application pool user rights in IIS.

    Try to add the applicaion pool user to SQL server users, or use impersonation.

    Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 30, 2013 10:43 AM

All replies

  • User-1315512054 posted

    Hello,

    It seems as permission issue as you have Admin in VS and Application pool user rights in IIS.

    Try to add the applicaion pool user to SQL server users, or use impersonation.

    Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 30, 2013 10:43 AM
  • User-1966295144 posted

    I don't know how to add the IIS APPPOOL\(MyAppPoolName) as the SQL Server 2000 Enterprise Manager reported an error, but I saw you mentioned impersonation, and what a magic, a slight modification to the Web.config as follows...

    <configuration>
      <system.web>   
     <identity impersonate="true" <o:p></o:p>
       userName="(domainName)\(userName)" <o:p></o:p>
       password="(password)" /><o:p></o:p>
      </system.web>
    </configuration>

     

    ...worked perfectly and it runs now!!!

     

    Thanks a billion, HostingASPNet!

    Thursday, January 31, 2013 2:33 AM