Try our conversational search powered by Generative AI!

Login failed when trying to run a new site in Azure



I have been struggling with a strange error for some time.. 

Server Error in '/' Application.

Login failed for user 'EPiServerAdmin'.

[SqlException (0x80131904): Login failed for user 'EPiServerAdmin'.]
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) +907

However when i copy the same connectionstring locally all works fine.. 
I can login and edit.. 

I have looked throught all settings and all seems fine.. 

the next error is 

[InitializationException: Initialize action failed for Initialize on class EPiServer.Data.DataInitialization, EPiServer.Data, Version=, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +492

but i guess is because it can´t acces the DB for some reason..

Anyone have idea what i could have missed? 

Edited, Nov 12, 2018 19:15

Not Azure expert - but perhaps you have to grant access to your AppService IP from your database?

Nov 12, 2018 19:35

Thanks Quan, but i did that, it also gives different error when it can´t acces it

Nov 12, 2018 19:38

Maybe stupid question, but you've also installed the Azure packages for EPI? There is a difference in running EPI locally and in Azure. Also followed this guide?:

Nov 14, 2018 9:07

No question are stupid :), but yes i did that so it was not it.. 

And finnaly we got it working.. we deleted all resources from tghe resource group and recreated them wuith exactly same settings (we use arm template so we know settings are same) and now its working..

we tried to do that again 3 times in hope to reproduce the first error but now its working each time.. so strange, guess some Azure glitch.

but if someone get similar error like us, just remove all your resources and try again... also the tips from above Quan Mai and Jeroed are good to have in mind if you have problems with episerver in Azure 

Nov 14, 2018 9:37

I would say that it sounds like the old resorce somehow got the checkbox on the SQL Server part to accept connection from other Azure resources

Nov 14, 2018 9:56
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.