Login failed for user ”
Recently, when performing an upgrade from CMS5 to CMS6, I got the error message “Login failed for user ‘’” during the process.
I found this error message strange, since it had already done part of the upgrade. In addition the site was running fine against the database before the upgrade, so the connection string was fine.
Using the profiler for SQL Server, I saw that the upgrade process tried to connect to the database using the currently logged on windows user. This was later confirmed by EPiServer and I quote:
During upgrading process, 2 accounts are used to connect to SQL Server: the first one is current windows account (which probably cause exception in this case), the second one is the one specified in connectionstring.config (which should be ok, as the site itself is up and running).
I really don’t like the scripts connecting with a user without giving us the possibility of adjusting the connecting string for it, but since we have no way of handling it, workarounds needed to be found.
Scenario 1: All machines on same domain
This is the easy scenario. Since you are on the same trusted domain, al you need to do is give the windows user logged on when running the upgrade access on the database. Run the upgrade process and then remove the access again.
Scenario 2: SQL Server and Web server not on same domain
In this scenario, you will have to create a user on the SQL Server with the same username and password as the user logged into the webserver when running the upgrade. This will in most cases cause the upgrade to pass.
Scenario 3: No control over environment
In this case, typically production scenarios where you have limited access, you will need to setup the solution in a locally controlled environment, perform the upgrade and redeploy the solution



October 12, 2010 







Got this error when upgrading to 6
in the development area,
in the end we update the server in the staging environment