I have written an application in C# which uses the XML-RPC.net library. The application is very simple and aside from the XML-RPC stuff is doing very little, some impersonation for Powershell, some file generation, and a bit of authentication.
This applications has been running without issue on a bunch of 2012 R1 machines and also some 2008 R2 ones. Recently I added a few additional XML-RPC services and moved development to a 2012 R2 machine running Visual Studio 2013 (a move from 2012).
Immediately, while debugging with an external instance of IIS, I started seeing instances of 'SEHException - External component has thrown an exception' or, very occasionally, access violations. This was always when the application was running dormant, as it were, and never when making an XML-RPC call.
I suppose I am a scripter and engineer more than a programmer and am not ashamed my expertise is elsewhere. I did a ton of reading about how to throw up more information regarding the SEHException, and was about to post here asking for some pointers, when I came across a rather vague suggestion that someone had fixed much the same issue by compiling their application as x86, rather than Any CPU. Obviously this is not a fix, but I thought it might give me some additional information, so I tried it, and the crashes went away completely.
In all other instances where this application is working it has been complied as Any CPU and the application pool has x86 disabled.
Clutching at straws - but aside from the fact I've moved to Windows 2012 R2 and Visual Studio 2013 in the same leap, this new development box also has a lot more RAM - 256GB.
As a control, I built a 2012 R2 box with 8GB of RAM, installed Visual Studio, started debugging in Any CPU... No crash at all.
I ran a full mem-test on the box with 256GB of RAM - no issues. It is also showing no other issue of any kind.
It has identical IIS, .NET and Visual Studio patch levels.
I appreciate this is a question in the broadest possible terms, with no code example, but hopefully that is kinda OK. I'm really looking for some pointer or direction on how I can better get to the bottom of this, as I hate not understanding things.
The brick wall I hit when looking at ways to catch more info regarding the SEHException is that this is a web service, and I cannot generate the exception reliably, it's not raised through explicitly calling a method or anything. Simply when the web service is running.
Any help greatly appreciated.