Windows Application crashes due to CLR.dll - Windows 2008 R2 Server - c#

I have a Dot Net Framework 4.0 based application developed on Visual Studio 2010 Professional which is running as a Windows Service on Windows Server 2008 R2 Enterprise Version with Service Pack 1, 64 bit Operating System.
The application seems to crash intermittently and the reason is as below :
Faulting Module name: clr.dll, version: 4.0.30319.1026
Exception Code: 0xc0000409
Fault Offset: 0x002b79d8
Faulting module path: C:\Widows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Can you kindly let me know if there is any HOTFIX for this CLR.dll crash issue? If yes can you let me know regarding the same?

Install this HOTFIX from windows.

Related

WPF application crashing on Windows Server 2008

I received an error report regarding a WPF app that wouldn't start up in a Windows Server 2008 Service pack 2 server (the application is an administration tool we're distributing to our customers). Since this application has a lot of external references, I tried to simplify the problem by creating a simple WPF application using Visual Studio 2013: a plain white window with "hello world" showing and nothing more. I tried to make it run in the production server, with no luck: it always crashes immediately.
Here's what I have:
the application was created with the standard VS 2013 template for WPF, so it had 3.5 as the target framework; i changed it to 4.6
the server has the 3.5 SP1 and 4.6 versions of the .net framework installed
the app.config is well-formed, with the configSections section on top, no additional references besides log4net, supportedRuntime tag set according to the target framework version
I already checked that there are no project references from version 3.5 left in the project
I already tried logging in the DispatcherUnhandledException and in the AppDomain.UnhandledException handlers
the application runs in my development environment
the application runs in production environment only if I change the target framework to 3.5. In this case, the WPF windows shows up and the log file is correctly produced
I already tried producing a dump and trying to debug it in Visual Studio: I just get a "Source not available" message and a stack trace ending with ntdll.dll!NtWaitForSingleObject()
Here are the error details:
Description:
Stopped working
Problem signature:
Problem Event Name: APPCRASH
Application Name: MyApp.exe
Application Version: 1.0.0.0
Application Timestamp: 5bfc07f1
Fault Module Name: KERNEL32.dll
Fault Module Version: 6.0.6002.24367
Fault Module Timestamp: 5ae3dcd9
Exception Code: e0434352
Exception Offset: 000000000001667d
OS Version: 6.0.6002.2.2.0.272.7
Locale ID: 1033
The Windows event log shows little information:
Faulting application MyApp.exe, version 1.0.0.0, time stamp 0x5bfc07f1, faulting module KERNEL32.dll, version 6.0.6002.24367, time stamp 0x5ae3dcd9, exception code 0xe0434352, fault offset 0x000000000001667d, process id 0x%9, application start time 0x%10.
Application: MyApp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code e0434352, exception address 0000000077A6667D
Stack: [this is empty]
Any suggestions?
Just in case someone else stumbles on the same problem, looks like the KB4457921 update from Microsoft somehow solves the issue. If an update is not possible, consider porting the code back to .net framework v. 3.5.

C# application using Microsoft.Office.Interop.Excell dll throws exception(error: 80080005) when Windows trusted apps is installed with OS installation

Issue:
I am facing an issue in Win10 PC while running a C#application created in VS 2013. The application always throws exception when it tries to create excel instance.
Microsoft.Office.Interop.Excel is added in project reference(:\Program Files (x86)\Microsoft Visual Studio 12.0\Visual Studio Tools for Office\PIA\Office15\Microsoft.Office.Interop.Excel.dll)
The below Exception is obtained:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))
From event viewer I see the error related to excel.exe version 16 bing called:
Faulting application name: EXCEL.exe, version: 16.0.8528.2136, time stamp: 0x59d6c372
Faulting module name: KERNELBASE.dll, version: 10.0.16299.371, time stamp: 0xee297154
Exception code: 0xc06d007f
Fault offset: 0x00103ef2
Faulting process id: 0x2c8c
Faulting application start time: 0x01d41f1db8e05601
Faulting application path: C:\Program Files\WindowsApps\Microsoft.Office.Desktop.Excel_16000.8528.2136.0_x86__8wekyb3d8bbwe\Office16\EXCEL.exe
Faulting module path: C:\windows\System32\KERNELBASE.dll
Report Id: 5c23fa18-770c-4233-b803-e57c2bf68174
Faulting package full name: Microsoft.Office.Desktop_16000.8528.2136.0_x86__8wekyb3d8bbwe
Faulting package-relative application ID: Excel
Code snippet:
The application is trying to create an instance of Microsoft.Office.Interop.Excel.Application:
public ExcelReader()
{
try
{
m_excelApplication = new Microsoft.Office.Interop.Excel.Application();
}
catch(System.Exception Exp)
{
MessageBox.Show( Exp.Message );
}
}
Environment details:
During OS installtion there is something called trusted apps which is installed by default. We can see the icons related to Excel 2016, Word 2016 etc in Windows option.
But in my machine only Office 2013(64 bit) is installed after fresh OS installation.I have the exe for MS office 2013 present in "C:\Program Files\Microsoft Office\Office15\EXCEL.EXE"
Why is the excel.exe version 16(C:\Program Files\WindowsApps) called when application launches
Issue is observed in machines which have MS office 2016, MS office 2013 installed which has the trusted apps(2016) installed by default.
Could somebody help me out on this.
After hours and hours of searching the web for an answer regarding this issue, I have found that under Component Services > Computers > My Computer > DCOM Config > Microsoft Excel Application >> Properties panel - [Identity tab], the default setting for Windows 10 is The launching user, while on Windows 7 the default one is The interactive user. Changing the identity setting on Windows 10 to The interactive user solved this issue for me.
Hope this will save other people the amount of time it took me to find an answer.
This issue happens because of Interop libraries. The Interop libraries have different methods in different versions. You have to check the version of Interop libraries that you currently have and use appropriate libraries that you need for current Office that is installed.
On that Microsoft page you can see the information where you can get Introp libraries for installed office version.
If you want to support multiple office versions, you have to install the minimal version that you clients can have (2010 for example) and then write proxy classes that will detect version of MS Office and use their functionality and methods via CLSID.

VS17 Installation: Bootstrapper has stopped working

I recently created a windows server on Windows Server 2008 operating system. Once I had done that I tried to install Visual Studio 2017, I have tried all versions including community professional and enterprise. All of them show the same error as soon as I run the setup for each one as the image I have posted below.
screenshot can be viewed here
Problem details:
Description:
Stopped working
Problem signature:
Problem Event Name: APPCRASH
Application Name: vs_setup_bootstrapper.exe
Application Version: 15.0.293.51136
Application Timestamp: 588935a6
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7601.17514
Fault Module Timestamp: 4ce7c78c
Exception Code: e0434f4d
Exception Offset: 000000000000a49d
OS Version: 6.1.7601.2.1.0.1296.17
Locale ID: 1033
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
Windows Server 2008 is not supported by VS2017

Windows App crashing at start, when build not created on same machine

Im working on a windows 8.1 store app project, when i create a App package and install it on the same machine it works well, if i then use that package on a diferent machine, i get a crash at splash screen
Machine 1: PC with windows 10, developer mode activatedmm With visual studio 2015 installed
Machine 2: Surface with windows 8.1, With visual studio 2015 installed
On the tablet logs i see 2 errors
first one is:
Event id 5973
Activation of app app_03ym3vjwssmsm!App failed with
error: The remote procedure call failed. See the
Microsoft-Windows-TWinUI/Operational log for additional information.
and the second one:
Faulting application name: myapp.exe, version: 1.0.0.4, time stamp:
0x563a19ef
Faulting module name: Windows.UI.Xaml.dll,
version:6.3.9600.17904, time stamp: 0x557b0ffa Exception code:
0xc000027b Fault offset: 0x00000000009829ea
Faulting process id: 0xad8 Faulting application start time:
0x01d11754e5d0b115
Faulting application path: C:\Program
Files\WindowsApps\app_1.1.0.25_x64__03ym3vjwssmsm\myapp.exe
Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll Report
Id: 23b679c5-8348-11e5-be73-6045bde98157
Faulting package full name: app_1.1.0.25_x64__03ym3vjwssmsm Faulting
package-relative application ID: App
Also, both machines run on x64 , and i build my package as x64.
I use a test certificate.
Do i need to something extra for my package to run on other machines?
EDIT
If i create app package on Machine 1, and install on Machine 1 - Works
If i create app package on Machine 2, and install on Machine 2 - Works
If i create app package on Machine 1, and install on Machine 2 - fails
If i create app package on Machine 2, and install on Machine 1 - fails

Microsoft Media Foundation in Microsoft Windows Server 2008 R2

We use Microsoft Media Foundation in our app (for app we use C# + C++/CLI) which should run on Microsoft Windows Server 2008 R2. App works on Win 8 but when we run it on MS Server 2008 R2 machine it crashes with FileNotFoundException - Could not load file or assembly '...' or one of its dependencies. In windows logs we find such error:
Faulting application name: MOF.Video.Example.exe, version: 1.0.0.0,
time stamp: 0x5303b258 Faulting module name: KERNELBASE.dll, version:
6.1.7601.17651, time stamp: 0x4e21213c Exception code: 0xe0434352 Fault offset: 0x000000000000cacd Faulting process id: 0xee8 Faulting
application start time: 0x01cf2ce85eee5491 Faulting application path:
C:\Users\Administrator\Desktop\MOF\MOF.Video.Example.exe Faulting
module path: C:\Windows\system32\KERNELBASE.dll Report Id:
9d972c94-98db-11e3-91f3-90e6bac09d51
OS: MS Server 2008 R2 x64
App: x64
You may need to add the Desktop Experience to the server:
http://technet.microsoft.com/en-us/library/cc772567.aspx
Otherwise, you may be attempting to utilize a codec which is not installed.

Categories

Resources