NT AUTHORITY\IUSR Logon Failure workaround
1 Open the website today, suddenly reported this error, usually good2 3Cannot open database"aslkm"Requested by the login. The login failed. Login failed forUser'NT authority\iusr'.4 My connection string is this, with Windows Authentication logon:5 6Data source=.\sqlexpress;initial catalog=aslkm;integrated security=true;multipleactiveresultsets=true;application Name=EntityFramework7 8 9 think of a recent just modified a Web. config configuration, that is, add the following sentence in Web. config, it is used to impersonate the IIS authentication account, if the user name is not specified, so the default is NT authority\iusrTen One<identity impersonate="true"/> A - - because the user has insufficient permissions to log on to the specified database, Windows authentication fails with three solutions: the - 1You can change the connection string to a user name (SA) and password login, if you do not have permission to operate the server recommend this scenario; - - 2or comment out this sentence from within the system.web, but may affect other functions, such as file operation; + - 3. Open SQL Server Management Studio, Security-Logins, right-click New login .... login name fill in NT authority\iusr-&G TOK + AOn the new user NT authority\iusr, right-click Properties---Server Roles selected Publicand sysadmin--User Mapping Select your database, and in the Default Schema column, fill in the dbo--OK!
NT AUTHORITY\IUSR Logon Failure workaround