ASP.NET Assembly Error binding logging off - asp.net

Hey just getting following error
Could not load file or assembly 'Ektron.Cms.Controls, Version=8.0.1.87, Culture=neutral, PublicKeyToken=559a2c4fa21e63be' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
On line
<%# Master Language="VB" AutoEventWireup="false" CodeBehind="LoggedIn.master.vb" Inherits="udpharmalecheile.LoggedIn" %>
With further information
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Ektron.Cms.Controls, Version=8.0.1.87, Culture=neutral, PublicKeyToken=559a2c4fa21e63be' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Any Idea what I can do to resolve this ?

I was using two different versions of DLLs. Solved

Related

Could not load file or assembly Microsoft.VisualStudio.DevOps.Contract

I'm trying to publish a .NET Core (3.1) Web Application for the first time in Visual Studio 2019 and I get the error:
System.BadImageFormatException: Could not load file or assembly 'Microsoft.VisualStudio.DevOps.Contract, Version=15.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'Microsoft.VisualStudio.DevOps.Contract, Version=15.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.BadImageFormatException: Could not load file or assembly 'Microsoft.VisualStudio.DevOps.Contract, Version=15.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'Microsoft.VisualStudio.DevOps.Contract, Version=15.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.FetchContinuousDeliveryService()
at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.InitializeContinuousDelivery()
at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel..ctor(IThreadSwitcher threadSwitcher, IPublishServiceProvider serviceProvider, IVsHierarchy hierarchy, ITelemetryProvider telemetryProvider, IVsWrappersFactory vsWrappersFactory, IReadOnlyList`1 providers, IFeatureManager featureDetectionManager, IProfileController profileController, IDependenciesManagerProvider dependenciesManagerProvider)
at Microsoft.Publish.Framework.Provider.DefaultPublishTabProvider.CreateViewAsync(IVsHierarchy project, IAsyncServiceProvider serviceProvider, CancellationToken cancellationToken)
at Microsoft.Publish.Framework.Provider.PublishProjectDesignerTabProvider.<CreateViewAsync>d__7.MoveNext()
The publish window seems to not be fully drawn out in VS 2019 afterward. Any ideas out there?
I've found an answer to this issue and I'm posting it here. I reinstalled VS2019. I may have missed installing key components during original installation, such as Azure, I'm uncertain on that detail.

.NET Parser Error Message: Could not load file or assembly 'System.Web.Mvc

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a
configuration file required to service this request. Please review the
specific error details below and modify your configuration file
appropriately.
Parser Error Message: Could not load file or assembly 'System.Web.Mvc,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or
one of its dependencies. The system cannot find the file specified.
Source Error:
Line 138:
Line 139: Line 140:
Line 141: Line 142:
Source File: C:\Cerquit\CAS\BJSDLeasing\Publish\web.config Line:
140
Assembly Load Trace: The following information can be helpful to
determine why the assembly 'System.Web.Mvc, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
WRN: Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
Version Information: Microsoft .NET Framework Version:2.0.50727.5485;
ASP.NET Version:2.0.50727.5491

Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies.

I am facing issue on server, it is saying that System.Windows.dll could not found. At First time execution, it is throwing Exception but after refreshing page it is working fine.
I figured out, this is happening because of ScriptManager. I have ScriptManager on my page, see the error below:
Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
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.FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 148: <img src="../../Images/loading.gif" width="500" />
Line 149: </div>
Line 150: <asp:ScriptManager ID="ScriptManager1" runat="server">
Line 151: </asp:ScriptManager>
Line 152: <table border="0" cellspacing="0" cellpadding="0" width="100%">
Source File: d:\xyz\CRM\Reports\zyz.aspx Line: 150
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
You will find the dll in the references folder:
Copy local = true
Set this property on the assembly.
Build, and it should work.
If not:
copy this dll into the project and set copy to output directory = Copy if newer
EDIT:
Try to use this scriptmanager:
Download from here
ToolkitScriptManager

How can I find out why an assembly is required in ASP.Net MVC4 project?

I am trying to deploy my ASP.Net MVC4 application to Azure but it is crashing during deployment. Apparently this is because something is requesting assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' . This all works perfectly locally and is a nightmare to debug on Azure as deployment takes 25-30 minutes for me.
I had thought I had configured CLR to not require MVC3 even if something wanted it by using:
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
If I look at the ObjectBrowser nothing seems to be requiring MVC3. What is the best way to figure out what is requesting it? I have various Nuget packages in the project. I guess one of them is requesting MVC3? Is there anyway to see a list of all dependencies etc?
I get:
CLR exception type: System.Reflection.ReflectionTypeLoadException
"Unable to load one or more of the requested types. Retrieve the
LoaderExceptions property for more information."
Microsoft.WindowsAzure.ServiceRuntime Critical: 201 : ModLoad:
000007fc906a0000 000007fc907a9000
D:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll Role
entrypoint could not be created: System.TypeLoadException: Unable to
load the role entry point due to the following exceptions:
-- System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040) File name:
'System.Web.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'
WRN: Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property
for more information. at
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at
System.Reflection.RuntimeModule.GetTypes() at
System.Reflection.Assembly.GetTypes() at
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly
entryPointAssembly) --- End of inner exception stack trace ---
at
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly
entryPointAssembly) at
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.CreateRoleEntryPoint(RoleType
roleTypeEnum) at
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType
roleTypeEnum) ModLoad: 000007fca2f00000 000007fca2f96000
D:\Windows\SYSTEM32\clbcatq.dll ntdll!ZwTerminateProcess+0xa:
000007fc`a2fa2eaa c3 ret
and
Exception object: 00000000017e0070 Exception type: System.TypeLoadException Message: Unable to load the role
entry point due to the following exceptions:
-- System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040) File name:
'System.Web.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'
WRN: Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
InnerException: System.Reflection.ReflectionTypeLoadException, Use
!PrintException 00000000017dcf08 to see more. StackTrace (generated):
StackTraceString: HResult: 80131522
You can use Reflector to load the Nuget packages and look at their dependencies. Should be fairly easy to spot whether one is dependent upon MVC3. Your assembly binding looks fine though. Do you have multiple projects in your solution? Could one of those be taking a dependency on a Nuget package that depends on MVC3?
This post may help: How can I build a 'dependency tree diagram' from my .NET solution

Could not load file or assembly 'MySql.Data, Version=6.3.6.0

I'm at a COMPLETE loss - I'm having super wierd issues with what I still really dont even understand... I'm running Entity Framework 4.1, MySql 5.xx and my MySql Connector is v 6.4.4 - everything works beatifully locally however whenever I upload to the server I receive:
Could not load file or assembly 'MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
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 'MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 48: /// Initializes a new proventradesEntities object using the connection string found in the 'proventradesEntities' section of the application configuration file.
Line 49: /// </summary>
Line 50: public proventradesEntities() : base("name=proventradesEntities", "proventradesEntities")
Line 51: {
Line 52: this.ContextOptions.LazyLoadingEnabled = false;
Source File: e:\web\proventrade\htdocs\App_Code\ProvenTrades.Designer.cs Line: 50
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I am SO confused, I am positive that I have MySql 6.4.4 dll's in my Bin directory, also my Web.config makes ZERO references to version 6.3.6 - I've searched my entire project (using global find) for 6.3.6 and even just for MySql to see if I can find ANY random references to this rogue 6.3.6 version but I find nothing!
I'm so lost and am getting no where. I would GREATLY appreciate any guidance on this, thanks so much in advance.
You must add provider library to bin directory in your web application and register provider in your web.config
Then You must download Connector .Net Mono here.
And put Dlls into bin folder.

Resources