Page 1 of 1

.NET client and console application

Posted: Mon Jul 21, 2014 5:40 am
by wayncom
Hello,
We want to create a .NET console app to process our logs of user agent strings and to get information about them from WURFL Cloud service. I have downloaded .NET client, but couldn't get library to work in console app. It only works in ASP.NET environment. In the app, I get an exception:

Code: Select all

Attempt by security transparent method 'ScientiaMobile.WurflCloud.Http.CloudClient.MapJsonToResponse(System.String)' to access security critical method 'System.Web.Script.Serialization.JavaScriptSerializer..ctor()' failed.
Is it possible to use the library in non-web project?

Regards,
Michal

Re: .NET client and console application

Posted: Mon Jul 21, 2014 3:05 pm
by Elliotfehr
Michal,

I have notified our engineering team and they are currently looking into this issue at the moment. I the meantime, are you able to let me know which version of the cloud client you are using?

Thank you,

Elliot

Re: .NET client and console application

Posted: Tue Jul 22, 2014 2:38 am
by wayncom
I am using WURFL-Cloud-Base-NET4-1.1.0.0

Re: .NET client and console application

Posted: Tue Jul 22, 2014 9:15 am
by support-all
At the moment the Cloud Client is only supported in an ASP.NET environment.

A possible suggestion would be to write a web app that performs the queries on UAs and exposes results back to the console app via a plain HTTP endpoint.

Please let us know how it goes.

Regards

Re: .NET client and console application

Posted: Mon Jun 22, 2015 4:33 am
by digitalturbine
In visual studio, right click on your project and select properties.

In the properties page go to "Debug" tab and uncheck "Enabled visual studio hosting process"