1
Problem when loading AlphaFS library when publishing website
Problem reported by Alexandre Boucher - January 19 at 9:29 AM
Resolved
I use FileUltimate successfully in development and production environments. However, when we use Visual Studio Publish functionnality to publish the website in production, we get an error saying it can't load AlphaFS. The error stays there for like a minute and then goes away. Everything is working fine, but having this temporary error at each site publication is very annoying. Here is the relevant IIS Exception log : 
 
Event code: 3005 
Event message: Une exception non gérée s'est produite. 
Event time: 2017-01-19 12:14:16 
Event time (UTC): 2017-01-19 17:14:16 
Event ID: 1fb4994ad7ce4b66878dec3bcdae1df9 
Event sequence: 1 
Event occurrence: 1 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/25/ROOT-6-131293196563355281 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: D:\Solutions_Web\MaRuche\cms.maruche.ca\ 
    Machine name: PROD-WEB-R2 
 
Process information: 
    Process ID: 246488 
    Process name: w3wp.exe 
    Account name: IIS APPPOOL\cms.maruche.ca 
 
Exception information: 
    Exception type: InvalidOperationException 
    Exception message: La méthode d'initialisation de pré-démarrage de l'application PreApplicationStart de type GleamTech.DocumentUltimate.Web.DocumentUltimateWebConfiguration a levé une exception avec le message d'erreur suivant : Une exception a été levée par l'initialiseur de type pour 'GleamTech.DocumentUltimate.Web.DocumentUltimateWebConfiguration'..
   à System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures)
   à System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods)
   à System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
   à System.Web.Compilation.BuildManager.ExecutePreAppStart()
   à System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

Une exception a été levée par l'initialiseur de type pour 'GleamTech.DocumentUltimate.Web.DocumentUltimateWebConfiguration'.
   à GleamTech.DocumentUltimate.Web.DocumentUltimateWebConfiguration.PreApplicationStart()

Une exception a été levée par l'initialiseur de type pour 'GleamTech.Configuration.ConfigurationBase`1'.
   à GleamTech.Reflection.AssemblyResourceStore..ctor(String name, Type assemblyResourceLocatorType, String overrideFolderPath)
   à GleamTech.DocumentUltimate.Web.DocumentUltimateWebConfiguration..cctor()

Impossible de charger le fichier ou l'assembly 'AlphaFS, Version=2.1.0.0, Culture=neutral, PublicKeyToken=4d31a58f7d7ad5c9' ou une de ses dépendances. Le fichier spécifié est introuvable.
   à GleamTech.Caching.DiskCache.set_Path(BackSlashPath value)
   à GleamTech.Web.GleamTechWebConfiguration.InitCurrent()
   à GleamTech.Configuration.ConfigurationBase`1..cctor()

 
 
Request information: 
    Request URL: https://cms.maruche.ca:443/Content/Images/microsite/maRuche.svg 
    Request path: /Content/Images/microsite/maRuche.svg 
    User host address: 24.226.148.159 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: IIS APPPOOL\cms.maruche.ca 
 
Thread information: 
    Thread ID: 117 
    Thread account name: IIS APPPOOL\cms.maruche.ca 
    Is impersonating: False 
    Stack trace:    à System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures)
   à System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods)
   à System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
   à System.Web.Compilation.BuildManager.ExecutePreAppStart()
   à System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
 
 
Custom event details: 
EDIT:
Resolved by installing AlphaFS in the solution using this command in Nuget Package Manager:
Install-Package AlphaFS -Version 2.1.0
 

2 Replies

Reply to Thread
0
Cem Alacayir Replied
January 19 at 9:49 AM
Employee Post
Do you confirm the error still happens with FileUltimate v5.7.1 (January 16, 2017) ?
1
Cem Alacayir Replied
January 26 at 5:14 AM
Employee Post
FYI, I think we completely fixed it now in v5.7.3. 
v5.7.3 is now live on the web site and nuget.
 
It turned out the error was due to a stupid bug: 
The log file AssemblyResolver.log was locked when you first started your web app as expected but even if you restarted the web app it could stay locked.
Then during the next web app initialization, AssemblyResolver would fail initialization because it could not overwrite the log file AssemblyResolver.log.
It was hard to replicate because the file did not stay locked after every restart/recycle.
 

Reply to Thread