Per Malmberg - 158 - Jan 5, 2014

Per Malmberg:

Demis, any ETA when you will push out the new release?

+Per Malmberg v4.06 is currently published on MyGet, see: https://plus.google.com/106787359118990653189/posts/PVy5rpBucLm
I’m currently writing up release notes for it before publishing it on NuGet as there were a few user-facing changes I want to document first.

Per Malmberg:

Ah, awesome! Thanks +Demis Bellot

Per Malmberg:

Hello again, +Demis Bellot  

I updated to 4.06 now and here’s what I got:

Error this.ProcessRequest(context): [AggregateException]: One or more errors occurred.
System.AggregateException: One or more errors occurred. —> System.NotImplementedException: Cannot execute handler: BeyondM
easure.WebAPI.StaticFileHandler at PathInfo: /Index2.html
   — End of inner exception stack trace —
-> (Inner Exception #0) System.NotImplementedException: Cannot execute handler: BeyondMeasure.WebAPI.StaticFileHandler at PathInfo: /Index2.html<—

Stacktrace:
> WebAPI.dll!BeyondMeasure.WebAPI.LoggerProxy.Error(object message, System.Exception exception) Line 48 C#
  ServiceStack.dll!ServiceStack.Host.HttpListener.HttpListenerBase.HandleError(System.Exception ex, System.Net.HttpListenerContext context) + 0x17b bytes
  ServiceStack.dll!ServiceStack.Host.HttpListener.HttpListenerBase.ListenerCallback.AnonymousMethod__0(System.Threading.Tasks.Task x) + 0x6c bytes
  mscorlib.dll!System.Threading.Tasks.Task.Execute() + 0x6e bytes
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x285 bytes
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x9 bytes
  mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot) + 0x2c5 bytes
  mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution) + 0x85 bytes
  mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x1ea bytes

The question is now what isn’t implemented? I am 100% sure I’m not throw the NotImplementedException exception in my code.  The StaticFileHandler is the same as linked above.

Any ideas?

Yeah your handler needs to implement IServiceStackHandler so it works in both ASP.NET and HttpListener hosts, here’s the exception: https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack/AppHostHttpListenerBase.cs#L58

Per Malmberg:

Oh, wow. May I suggest updating HttpHandlerResolverDelegate so that it reflects the actual requirements for a handler? If ever possible, things should be typed.