I'm hosting a website on Azure, and it's been working fine for the past few months. I'm using a devops build/release pipeline for CI, which works great as well.
This morning, my website went down with a 502.5 error - Process Failure without any recent changes or commits to the solution.
I've tried restarting it, I've tried debugging it through Azure.
I ended up trying to use dotnet .[app name here] in the console in Azure, which gave the following error:
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Server.IISIntegration, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Microsoft.AspNetCore.WebHost.CreateDefaultBuilder(String[] args)
at InventoryManagementGalten.Program.CreateWebHostBuilder(String[] args) in D:\a\1\s\InventoryManagementGalten\Program.cs:line 14
at InventoryManagementGalten.Program.Main(String[] args) in D:\a\1\s\InventoryManagementGalten\Program.cs:line 10
which sounds like a version mismatch - although I'm not sure where or how to fix it.
Any ideas are much appreciated!
Update: When I go into application logs, this is the first error that randomly appeared in the middle of the night:
Application: dotnet.exe
CoreCLR Version: 4.6.27129.4
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Server.IISIntegration, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Microsoft.AspNetCore.WebHost.CreateDefaultBuilder(String[] args)
at InventoryManagementGalten.Program.CreateWebHostBuilder(String[] args) in D:\a\1\s\InventoryManagementGalten\Program.cs:line 14
at InventoryManagementGalten.Program.Main(String[] args) in D:\a\1\s\InventoryManagementGalten\Program.cs:line 10
Edit:
Solved, read comment below.
The nuget package Microsoft.AspNetCore.Server.IISIntegration was listed with Version 2.1.7, but I was using 2.2 in my project.
I changed the project to use 2.1.7 for now, but I'll have to look into how I upgrade it in the future.
Related
I created one sample cordova app using windows platform and added one test plugin , while calling native code through test plugin. I'm getting exception
WinRTError: The text associated with this error code could not be found.
System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.11.0, Culture=neutral, PublicKeyToken=..'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at WindowImageAnnotation.ImageAnnotationPlugin.CreateImageAnnotation(String jsonString)
at module.exports.coolMethod (ms-appx-web://../www/plugins/cordova-plugin-imagewindow/src/windows/WindowImageProxy.js:25:11)
App Version:
Native code version:
This line throwing exception inside plugin, method is present in that variable "ev"
Exception:
Native code:
I changed the version also and tried but getting every time same exception. Any solution about this.
Will provide if anything required.
Thanks in Advance
Running App in Visual Studio Community 2017 15.9.30
I followed the guide bellow to run a simple C# console program on my ubuntu box, and everything went smoothly. (I am trying to run everything natively using .Net Core without any usage of Mono!)
The guide:
https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md
But when I did the same, trying to run an ASP.Net web application (the very basic and simple template generated by Visual Studio), I get this error:
root#dotnet:/dotnet/aspnetcore/PublishOutput# /dotnet/dotnet WebApplication1.dll
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.ComponentModel.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Microsoft.Extensions.FileProviders.PhysicalFileProvider.CreateFileWatcher(String root)
at Microsoft.AspNetCore.Hosting.Internal.HostingEnvironmentExtensions.Initialize(IHostingEnvironment hostingEnvironment, String applicationName, String contentRootPath, WebHostOptions options)
at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildHostingServices()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at WebApplication1.Program.Main(String[] args)
Aborted (core dumped)
Could some one help me to solve that and to run ASP.Net App natively on my RPi3?
P.S. I don't think this is important, but I am working in Docker container.
Some one on GitHub found the solution!! big thanks to him. Actually it is a workaround till we can build the app on ARM directly or find another real solution, but this workaround works very good now!
https://github.com/dotnet/coreclr/issues/9168#issuecomment-277846829
After upgrade from Kentico 8.2 to 9.0 and update to hotfix v9.0.16 my website crashed. It runs once successfully (no errors in log, upgrade start and finish) and after application restart I have got this error:
Could not load file or assembly 'CMS.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Full error
https://jsbin.com/defitojura/edit?output
Site is running on Azure
Did you check your references to custom dlls ?
This exception occurs when i try to load my app on my device (lumia 950).
An exception of type 'System.IO.FileLoadException' occurred in Template10Library.DLL but was not handled in user code
Additional information: Could not load file or assembly 'System.Threading, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The environment: I'm using Template10 as a git submodule in my project instead of as a nuget package. I also have 2 other 'Class Library' projects and 1 'Windows Runtime Component' projects in my solution that my app depends on.
I'm a bit out of my depth here, I'm pretty new to app development and I have no clear understanding on the particulars of the windows build/deploy/runtime environment so I don't really know where to start.
I know you probably require more information in order to help me, so just ask and I'll try to get back to you.
Edit:
I added the following code in my app so that it ran before I got the exception above.
try
{
var assm = Assembly.Load(new AssemblyName("System.Threading"));
}
catch(Exception e)
{
System.Diagnostics.Debugger.Break();
}
By pausing the debugger at var assm ... I got the following information from the loaded assembly:
Fullname: "System.Threading, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
ImageRuntimeVersion: "v4.0.30319"
Location: "C:\windows\system32\SYSTEM.THREADING.NI.DLL"
So what does this mean? That my phone have older versions of system dll's? But why does my app require 4.0.10 when 4.0.0 should suffice?
EDIT 2:
I created a new blank app and a similar problem occured but this time with no library dependencies and this time I tried to use 'System.Net.Http.HttpClient' and I got the following exception:
An exception of type 'System.IO.FileLoadException' occurred in App1.exe but was not handled in user code
Additional information: Could not load file or assembly 'System.Net.Primitives, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I'm running OS build 10.0.10586.0 but I'm starting to consider that there is something wrong with my device.
Apparently my visual studio installation was messed up... so I did a complete reinstallation of the entire OS, and now it (and my apps) works properly.
Thank you Alan Yao for your input!
I am getting an error while running a .Net application.
The main problem which I feel is due to the Oracle.Data.Access.I made the project build to 32 bit as it had some problem of oracle exception
"Could not load file or assembly 'Oracle.DataAccess,
Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342'
or one of its dependencies. The system cannot find the file specified"
Making my project to 32 bit actually solved this Oracle problem, but then the following error is thrown:
((System.IO.FileNotFoundException)(the specified module could not be
found. (Exception from HRESULT: 0x8007007E)
I am actually trying to write to a file in the function from where the exception is being thrown.The file location is defined in app.config
Is this error due to 32 or 64 bit as my Windows 7 version is 64 bit and the project is built using 32 bit or something else
Please suggest a possible outcome of this error
The first error suggests the assembly (dll) Oracle.DataAccess is not found in your /BIN folder. If it is there please check the version, your application is expecting version: 2.111.7.20, you might be using another version.
Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified
The second error might be thrown because the Oracle.DataAcces it is 64-bit and your application is now running in 32-bit.