MessengerInstance.Send raises System.Reflection.TargetInvocationException on non-dev machines - mvvm-light

My application is raising the following exception:
System.Reflection.TargetInvocationException was unhandled
Message: An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an invocation.
When using MessengerInstance.Send from our home view. The code that raises the exception is here.
The exception does not occur on our development machines, it only occurs on the machines of our testers. At first the exception would crash the application, when I added the exception handler the exception would be caught the first time a user selected an archive to analyze and the application would work (not throwing an exception) with any archives selected afterwards.
You may be able to recreate this behavior with the latest release from GitHub, which does not have the try-except block (so the application will crash when an archive is selected).
We don't really know what's causing this bug, it's pretty odd. Our next step in testing is to send an entire package (with pdb, xml, and manifest files) to our testers to see if that changes anything. Any help would be most appreciated!

Related

IIS Web Farm No owin.Environment item was found in the context

I am trying to set load balancing with IIS ARR but getting this error when I try to login, It works find if I test it outside ARR
Server Error in '/' Application. No owin.Environment item was found in the context. 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.InvalidOperationException: No owin.Environment item was found in the context.
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.
ADDITIONAL INFORMATION:
After lots and lots of investigation and googling for answer, I still did not find answer why that error was happening. At last I tried fresh project and moved all my files to it and it worked.
It must have been some settings or anything, I don't know really. but creating new solution solved it.
if anyone knows exact reason why this happen, I would still like to know this.
After lots and lots of investigation and googling for answer, I still did not find answer why that error was happening. At last I tried fresh project and moved all my files to it and it worked.
It must have been some settings or anything, I don't know really. but creating new solution solved it.
if anyone knows exact reason why this happen, I would still like to know this.

'SysUtcDateTime' error during nopCommerce install - ASP.NET

Having bought a copy of the shop made in nopCommerce (files and database) we are trying to implement it on our server. After copy, such mistake appears:
SysUtcDateTime' is not a recognized built-in function name.
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.Data.SqlClient.SqlException: 'SysUtcDateTime' is not a recognized built-in function name.
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.
I found out here that it might be connected with the wrong version of SQL server in Nop.BusinessLogic. So, after simple edit in Notepad++ I changed '2008' to '2005', but no effects : (
Any ideas?
Anyway...I know that the topic of nopcommerce is not that popular, but maybe someone will look here for similiar solution.
I've got bad news - it turned out that the server I was trying to use had some old and outdated services. Only tip I can give:
Check the requirements of nopcommerce here, make sure that the
.NET Framework is consistent with your current source code, as well as
the version of the database).
Or change the server provider that supports nopcommerce solutions - as I did and solved the problem.

RPC_E_SERVERFAULT

In my asp.net application I am calling one com component method using Interop dll. This is working fine in normal condition but In production sometimes its throwing below exception
System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
I am suspecting that this is happening when large number of users are accessing same page simultaneously.
Is somebody know solution or steps to debug this issue.
I have another question. while searching on internet I came across this aspcompact attribute and MTA vs STA thread model related to com components . Is this aspcompact attribute is applicable in case of interop dll(Runtime callable wrappers). Will adding this attribute will solve my problem?
RPC_E_SERVERFAULT means that the out-of-process COM server threw a structured (Win32)exception, which could be all sorts of things, such as an Access Violation, Divide by Zero, etc. In other words, there's a bug in the COM server's implementation and there's nothing you can do in your calling application to cure this (unless you can find out what the bug is and can design a way to call the COM component which doesn't execute the buggy code).
You need to find whichever of your colleagues is responsible for the COM server, get him/her to use the debugger to capture a crash dump when the exception occurs, then do post-mortem debugging on the dump to diagnose the problem and fix it.
Monitor your site to capture exception when it raise.
Use Debug Diagnostics Tool v1.2
With the generated dump is easier to identify the point of failure.
Also could mean the COM object crashed. Try to rerun the application represented by the COM object by itself and see if it crashes or produces some error.
I had the same problem, but I got it to work by adding a [STAThread] attribute to the Main function.
[STAThread]
static void Main(string[] args)
I'm running Powershell scripts that use the MS Office 2010 Excel COM objects and started receiving this error. The culprit was the latest MS Office patches. Sorry, I can't specify exactly which one caused the error (I uninstalled a bunch at time), but uninstalling one of them solved the issues. The updates were installed on 7/18/2016.

State of the art post-mortem debugging for Plone

What's the recommended method for invoking pdb / ipdb on certain exceptions in Plone?
The most common use case would to
Turn on pdb on exception behavior temporary
Make sure pdb is only invoked for certain exceptions (UnicodeDecodeError...)
What add-ons, WSGI solutions, etc. for such debugging?
I haven't done any Plone development in about a year, but Products.PDBDebugMode used to be the greatest thing ever. When running in foreground mode, it would drop into PDB when an unhandled exception occurred.

How to debug "An unhandled exception occurred and the process was terminated" error

I am seeing error in IIS Log, Is there any way to know more info about this? We have multiple .NET apps running on IIS.
An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 7284
Exception: System.AppDomainUnloadedException
Message: Attempted to access an unloaded AppDomain.
StackTrace:
http://support.microsoft.com/kb/919789
Get crash dumps first, and then use Debug Diag or WinDbg to analyze the dumps. You will see all necessary information from it if you are familiar with the tools.
Microsoft support guys can also help if you open a support case via http://support.microsoft.com
You need to start looking deeper. Perhaps with logging and perhaps running the application in isolation with probes.
Is it a problem? If not stop perhaps?
First check the windows logs and look for more information.
Next check the IIS logs to see if anything is recorded there
Next if you can duplicate the error, try and narrow down to the steps to the bare minimum.
Does it occur on one machine, many machines, on euser many users etc etc...
Try run the app in isolation.
Attach a debugger to the IIS process and see if you can catch this exception alone. If you can then perhaps rebuild the code with symbols to give more information.
Try all these and see if you can find it.

Resources