Xamarin.Forms: Call to a API using ServiceStack throws exception

asked11 years ago
last updated11 years ago
viewed345 times
Up Vote0Down Vote

I have a local service made with ServiceStack and I want to call a method from my Xamarin.Forms application:

ServiceStack.JsonServiceClient sc;
  sc = new ServiceStack.JsonServiceClient("http://api.sportsstars.local/");

When the debugger reaches the second line, it throws this exception:

System.TypeInitializationException: An exception was thrown by the type initializer for ServiceStack.ServiceClientBase

Any ideas what could it be?