Augusto Peres - 499 - Jan 22, 2014

I am trying to use  the extension .ToOptimizedResult , on Windows everything works fine but when I test on ubuntu 13.10/ mono 2.10.8.1 I get "The requested feature is not implemented"

Can someone help me to discover if I am doing something wrong or it is a bug in servicestack ?

Thank you in advance !

My test setup is a VMWare Ubuntu 13.10 , mono 2.10.8.1, nginx 1.4.1 and servicestack.net 4.0.8

If I return the DTO object directly I get NO errors!
But if I try to use base.Request.ToOptimizedResult :

    List data = new List();
    data.Add(new dataItem { Data = “fake data” });
    return base.Request.ToOptimizedResult>(data);

I get the following exception:

The requested feature is not implemented. at System.Web.HttpContextWrapper.GetService (System.Type serviceType) [0x00000] in :0 at ServiceStack.Host.RequestPreferences.GetWorker (System.Web.HttpContextBase context) [0x00000] in :0 at ServiceStack.Host.RequestPreferences.get_HttpWorkerRequest () [0x00000] in :0 at ServiceStack.Host.RequestPreferences.get_AcceptEncoding () [0x00000] in :0 at ServiceStack.Host.RequestPreferences.get_AcceptsDeflate () [0x00000] in :0 at ServiceStack.RequestExtensions.GetCompressionType (IRequest request) [0x00000] in :0 at ServiceStack.RequestExtensions.ToOptimizedResult[List1] (IRequest request, System.Collections.Generic.List1 dto) [0x00000] in :0 at Phase1HistoryServer.SymbolsService.Get (Phase1HistoryServer.Symbols request) [0x00000] in :0

Scott McArthur:

I have answered this on SO. 
http://stackoverflow.com/a/21294048/1295344

Rudy Scott:

I don’t have specific advice–but that’s a pretty old version of Mono.  Have you tried 3.2.4?

Augusto Peres:

Thank you Scott !  I am implementing according your directions right now.

Augusto Peres:

I will try 3.2.4

Scott McArthur:

Yeah 2.10.8 is old. But as the answer states upgrading to the latest Mono build 3.2.6 won’t fix the issue directly. But still upgrade, then use the self hosted application option.

Augusto Peres:

Selfhosted works perfect!

Just one concern. I need  about 2 thousand requests for second. This is what my current box (windows/iis) handles.

Do you think that linux/selfhost can provide same/better performance on same hardware?

I am new to linux/mono and 2.10 is the current version for ubuntu 13.10.   Already grabbing a tutorial for compile mono 3.

You are so kind to help me , Thank you again and please, forgive my poor english!

+Augusto Peres You will have to benchmark it, but Mono is known to be noticeably slower than IIS so I wouldn’t consider Linux/Mono if you’re wanting to get the same performance as Windows.