Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

gourav sharma 1 Reputation point
2021-02-05T12:40:37.4+00:00

Server Error in '/' Application.

Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration' could not be loaded.

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///J:/ServerProject/ACRCT/ACRCT_AfterSystemFormat/platformLicensing_VendorInsert/acrctadmin/Web/SEC.ACR.ADMIN/
LOG: Initial PrivatePath = J:\ServerProject\ACRCT\ACRCT_AfterSystemFormat\platformLicensing_VendorInsert\acrctadmin\Web\SEC.ACR.ADMIN\bin

Calling assembly : (Unknown).

LOG: This bind starts in default load context.
LOG: Using application configuration file: J:\ServerProject\ACRCT\ACRCT_AfterSystemFormat\platformLicensing_VendorInsert\acrctadmin\Web\SEC.ACR.ADMIN\web.config
LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/gourav.s/AppData/Local/dftmp/Resources/156ba26c-5421-44a4-9680-bbe3a407ae79/temp/temp/RoleTemp/Temporary ASP.NET Files/root/0e2807d5/df948da7/Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.DLL.
LOG: Attempting download of new URL file:///C:/Users/gourav.s/AppData/Local/dftmp/Resources/156ba26c-5421-44a4-9680-bbe3a407ae79/temp/temp/RoleTemp/Temporary ASP.NET Files/root/0e2807d5/df948da7/Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration/Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.DLL.
LOG: Attempting download of new URL file:///J:/ServerProject/ACRCT/ACRCT_AfterSystemFormat/platformLicensing_VendorInsert/acrctadmin/Web/SEC.ACR.ADMIN/bin/Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.DLL.
LOG: Using application configuration file: J:\ServerProject\ACRCT\ACRCT_AfterSystemFormat\platformLicensing_VendorInsert\acrctadmin\Web\SEC.ACR.ADMIN\web.config
LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration, Version=5.1.1209.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
ERR: Failed to complete setup of assembly (hr = 0x80131047). Probing terminated.

Stack Trace:

[FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]

[FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration, Version=5.1.1209.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +232
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +113
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +23
System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +49

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration, Version=5.1.1209.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +762
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +259
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +167
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +238
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +78
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +334
System.Web.Compilation.BuildManager.ExecutePreAppStart() +178
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +746

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration, Version=5.1.1209.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.3752.0

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,415 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,288 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,846 Reputation points
    2021-02-08T11:38:53.037+00:00

    The Microsoft Practices stuff has not been maintained by Microsoft in years. I would verify that all your nuget packages have been restored. I would also look in your solution folder to see if the dll exists. If it is there right click on it and view it properties to make sure it is not blocked.

    I do see Dixin has a TransientFaultHandling library based on the old Microsoft Practices code. If when you try restoring your Nuget packages and find some missing packages maybe you can switch to this version

    0 comments No comments