1

I'm facing an issue with StormPath when trying to get my application. I am developing in .NET Framework.

I can clearly see in my NuGet packages that Stormpath.SDK.JsonNetSerializer has been installed when I installed Stormpath.SDK.

However, I'm getting this error:

Error while loading the default serializer. See the inner exception for details.
Inner Exception: Could not find plugin 'Stormpath.SDK.JsonNetSerializer'. Try specifying the plugins manually.

1 Answer 1

2

I'm the author of the package. Sorry about the confusion; this is a problem that happens in some environments. In the next major version, I'm going to refactor the internals to remove this error mode.

In the mean time, try specifying the plugins manually to get around it:

var client = Clients.Builder()
    .SetHttpClient(HttpClients.Create().RestSharpClient())
    .SetSerializer(Serializers.Create().JsonNetSerializer())
    .Build();
6
  • Thank you, only difference I have made to your suggestion is instead of SystemNetHttpClient, I have used RestSharpClient(). Thanks for the help :) Commented Jan 23, 2017 at 19:31
  • 1
    Gotcha, I edited my answer. I was trying to guess your environment. :) Let me know if you have any more questions about the library! Commented Jan 23, 2017 at 19:32
  • Hi Nate, what is the best practice on making this only executed once only i.e. running on at start up. So once it created client builder instance, each request made it can continue to do its operation (Add user, remove user and etc) ? i can create singleton instance but thinking on start up it should execute the code to create instance Commented Jan 24, 2017 at 20:35
  • @helloworld You should create the client once and then store it as a static variable, or better yet use an IOC container like Ninject or StructureMap. If you are using the ASP.NET plugin, this is done automatically for you. Commented Jan 24, 2017 at 21:08
  • Thank you. For future inquiry with StormPath how can I contact you or team for development side? Commented Jan 25, 2017 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.