- Joined
- Mar 26, 2018
- Messages
- 19
- Reaction score
- 1
Hi everyone,
I have 2 different customers and all of them are using my call control api. We install V16 for both of my customer. When ı want to run my app ı had a error every time.
The sample code below is working all my system except one. I dont understand its reason. Could you please help me.
Sample Code:
Target Framework: .net 4.5.1
Platform Target x64
3cx Dll's: 3cxpscomcpp2.dll, netstandard.dll, sl.dll, tcxpscom_native.dll
Console.WriteLine($"Enter cfg password");
var cfgPw = Console.ReadLine();
var a = new Random(Environment.TickCount);
PhoneSystem.ApplicationName = "TestApi" + a.Next().ToString(); //Line 21 Error happens there
PhoneSystem.CfgServerHost = "127.0.0.1";
PhoneSystem.CfgServerPort = 5485;
PhoneSystem.CfgServerUser = "cfguser_default";
PhoneSystem.CfgServerPassword = cfgPw;
Console.WriteLine($"Connected Phonesystem={ PhoneSystem.Root.Connected}");
Console.ReadLine();
Exception Message:
The type initializer for 'TCX.Configuration.PhoneSystem' threw an exception.
Exception Trace:
at TCX.Configuration.PhoneSystem.set_ApplicationName(String value)
at Test3cxSocket.Program.Main(String[] args) in C:\Users\abk\source\repos\Test3cxSocket\Program.cs:line 21
Have a good time
I have 2 different customers and all of them are using my call control api. We install V16 for both of my customer. When ı want to run my app ı had a error every time.
The sample code below is working all my system except one. I dont understand its reason. Could you please help me.
Sample Code:
Target Framework: .net 4.5.1
Platform Target x64
3cx Dll's: 3cxpscomcpp2.dll, netstandard.dll, sl.dll, tcxpscom_native.dll
Console.WriteLine($"Enter cfg password");
var cfgPw = Console.ReadLine();
var a = new Random(Environment.TickCount);
PhoneSystem.ApplicationName = "TestApi" + a.Next().ToString(); //Line 21 Error happens there
PhoneSystem.CfgServerHost = "127.0.0.1";
PhoneSystem.CfgServerPort = 5485;
PhoneSystem.CfgServerUser = "cfguser_default";
PhoneSystem.CfgServerPassword = cfgPw;
Console.WriteLine($"Connected Phonesystem={ PhoneSystem.Root.Connected}");
Console.ReadLine();
Exception Message:
The type initializer for 'TCX.Configuration.PhoneSystem' threw an exception.
Exception Trace:
at TCX.Configuration.PhoneSystem.set_ApplicationName(String value)
at Test3cxSocket.Program.Main(String[] args) in C:\Users\abk\source\repos\Test3cxSocket\Program.cs:line 21
Have a good time