Have developed a ASP.NET application, in which it will call a web service from another web application but within the same IIS server. Everything is fine until putting those into production server.
The web service requires Windows authentication. Error 401.1 "Unauthorized: Access is denied due to invalid credentials" occur even we pass the correct user name, password. We ensure the account is not locked.
After Googling, we found that it happens on Windows 2003 Server SP1, IIS6 with integrated authentication enabled.
Run following T-SQL Query in Query Analyzer to associate login with the username. ‘Auto_Fix’ attribute will create the user in SQL Server instance if it does not exist. In following example ‘ColdFusion’ is UserName, ‘cf’ is Password. Auto-Fix links a user entry in the sysusers table in the current database to a login of the same name in sysxlogins.
EXEC sp_change_users_login 'Auto_Fix', 'ColdFusion', NULL, 'cf'