Quantcast
Channel: [Q&A - FAQ Neotys] Last questions
Viewing all articles
Browse latest Browse all 2283

How do you use the Data Exchange API Clinet without getting errors on the NewClient method

$
0
0

I've got a simple Visual Studio program which references the NeotysRestDataExchangeAPI. I have successfully built the solution which uses the NewClient and TimerBuilder.Start/Stop.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Neotys.DataExchangeAPI.Model;
using Neotys.DataExchangeAPI.Client;

namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
IDataExchangeAPIClient client = DataExchangeAPIClientFactory.NewClient("http://IBA-SP4-RK:7400/DataExchange/v1/Service.svc/"...;);
// IDataExchangeAPIClient client = DataExchangeAPIClientFactory.NewClient("http://IBA-SP4-RK:7400/DataExchange/v1/Service.svc/");

for (int i = 0; i < 10; i++)
{
TimerBuilder timer1 = TimerBuilder.Start("Script1", "Timer1");
System.Threading.Thread.Sleep(1000);
client.AddEntry(timer1.Stop());
}
}
}
}

However when I run the .exe from with NeoLoad using the End User Experience Action I get the following Error. I have tried it with both the API Key set and not set within the REST API Project settings.

==== ERR ====

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Simple.OData.Client.Net40, Version=4.16.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at Neotys.DataExchangeAPI.Client.DataExchangeAPIClientOlingo..ctor(String url, Context context, String apiKey)
at Neotys.DataExchangeAPI.Client.DataExchangeAPIClientFactory.NewClient(String url)
at ConsoleApp1.Program.Main(String[] args) in C:\Users\RajKumar\source\repos\ConsoleApp1\ConsoleApp1\Program.cs:line 19


Viewing all articles
Browse latest Browse all 2283

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>