Java NoSuchAlgorithmException – SunJSSE, sun.security.ssl.SSLContextImpl$DefaultSSLContext

Well after doing some more searching I discovered the error may be related to other issues as invalid keystores, passwords etc. I then remembered that I had set two VM arguments for when I was testing SSL for my network connectivity. I removed the following VM arguments to fix the problem: -Djavax.net.ssl.keyStore=mySrvKeystore -Djavax.net.ssl.keyStorePassword=123456 Note: this … Read more

Unhandled Exception Global Handler for OWIN / Katana?

Try writing a custom middleware and placing it as the first middleware: public class GlobalExceptionMiddleware : OwinMiddleware { public GlobalExceptionMiddleware(OwinMiddleware next) : base(next) {} public override async Task Invoke(IOwinContext context) { try { await Next.Invoke(context); } catch(Exception ex) { // your handling logic } } } Place it as the first middleware: public class Startup … Read more

The ObjectContext instance has been disposed and can no longer be used for operations that require a connection [duplicate]

I am guessing that the problem is that the execution of your LINQ query has been deferred until starting to access them on your view. At this point db has already been disposed. Try this: return View(Users.ToList()); Added ToList() That will force the fetch from the DB before disposing db.

Exceptions in ASP.NET Web API custom exception handler never reach top level when CORS is enabled

I have found the source of confusion. It seems, WebAPI by default is using this exception handler: https://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Web.Http/ExceptionHandling/DefaultExceptionHandler.cs and it has major differences from the suggested exception handling in this article: http://www.asp.net/web-api/overview/web-api-routing-and-actions/web-api-global-error-handling see chapter “Appendix: Base Class Details”, where the code of default exception base class is given. In the example it checks for IsOutermostCatchBlock … Read more

Explicit/implicit cast operator fails when using LINQ’s .Cast() operator

When you define explicit/implicit cast operators, they are bound at call-sites at compile-time. That’s why the first line works: the compiler can work out all the type information needed, and so it can substitute your custom explicit cast operator for the default one. However, since the Cast<T> just performs a generic cast, the compiler doesn’t … Read more

EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) on dispatch_semaphore_dispose

From your stack trace, EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) occurred because dispatch_group_t was released while it was still locking (waiting for dispatch_group_leave). According to what you found, this was what happened : dispatch_group_t group was created. group‘s retain count = 1. -[self webservice:onCompletion:] captured the group. group‘s retain count = 2. dispatch_async(…., ^{ dispatch_group_wait(group, …) … }); … Read more