Profile cover photo
Profile photo
Blaž Miheljak
Blaž's posts

What is the reason, that GlobalResponseFilters aren't run for Razor pages? Any alternatives to achieve the same? And would be nice to mention it in docs..
Thanks, Blaz


I need to log validation errors, with complete request DTO.

I've setup ValidationFeature with ErrorResponseFilter in which I do the logging, which works just fine.
The problem is, that I can't find the way to get hold of the current IRequest in my ErrorResponseFilter.
I tried HttpContext.Current.ToRequest();, but this "recreates" the request, without resolving dto and of course with empty IRequest.Items (which I also need to get some info from previous filters).

Is there a way to get current IRequest instance? 

Thanks, Blaž

Demis, it looks like, there has been a slight version/compilation mixup on the nuget.
All packages (that I checked), looks like they have been compiled on 19.8, except for Api.Swagger, which looks like from 3.9., but all have version 4.0.31.
The problem arises, when using Swagger, I get:
Could not load type 'ServiceStack.Host.MetadataTypeExtensions' from assembly 'ServiceStack, Version=, Culture=neutral, PublicKeyToken=null'.","StackTrace"

And if check the ServiceStack.dll (v 4.0.31) it really doesn't contain the mentioned class - it has been added to git on 31.8. only...

I have a db field of short with values limited to 0,1,2, which I'd like to server in my api as "enum" of strings. eg (0:'NA', 1: 'male', 2:'female').

What'd be the best way to solve this?

I tried with enum, struct, class, with different type on dbpoco (short) and dto (string), with converting values in dbprovider... But I can't get it work completely. There is always one aspect (db reading/writing, serializing/deserializing, expression building, deserializing untyped conditions in AutoQuery etc), that fails.

Ideas appreciated.


I'm loving the new Autoquery feature, but I have a problem with joins. I can't find a way to explicitly state a join expression to be used.  

As I see it, the only option is to use reference naming convetions, which I can't for legacy reasons.

I think, that the best solution would be to use Attributes for defining relations - there is already References attribute which I think should be used, before falling back to naming conventions...

Hi Demis,

I'm having trouble compiling my project with SS4 against .net 4.0. It looks like, that NuGet package ServiceStack.Razor is only compiled for .net 4.5. Any reason for that or am I missing something?

Post has attachment

Post has attachment
uspelo nam je pregnati geje in lezbijke iz Maribora. Minuta 34 in dalje. Naša javna RTVS!

Post has attachment
Kaj bo torej, www ali appi? gol za www ravnokar....

Post has attachment
Wait while more posts are being loaded