Try our conversational search powered by Generative AI!

Login failed when trying to run a new site in Azure

Vote:
 

Hi

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=11.10.5.0, 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? 

#198994
Edited, Nov 12, 2018 19:15
Vote:
 

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

#198995
Nov 12, 2018 19:35
Vote:
 

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

#198996
Nov 12, 2018 19:38
Vote:
 

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?: https://world.episerver.com/documentation/developer-guides/CMS/Deployment/deployment-scenarios/Deploying-to-Azure-webapps/

#199046
Nov 14, 2018 9:07
Vote:
 

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 

#199047
Nov 14, 2018 9:37
Vote:
 

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

#199050
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.