Обновление NuGet, теперь выбрасывающее OpenTok: System.IO.FileLoadException: не удалось загрузить файл или сборку JWT Version = 2.0.0.0 на CreateSession - PullRequest
1 голос
/ 01 марта 2020

Я только что обновил все свои пакеты NuGet и больше не могу подключиться к сеансу. Я использую OpenTok 3.1.0 и JWT 6.1.0, но получаю следующую ошибку на OpenTok.ConnectSession:

OpenTok = new OpenTok(apiKey, apiSecret);
SessionHost = OpenTok.CreateSession(mediaMode: MediaMode.ROUTED);   <-- error here

3/1/2020 7:40:08 AM ERROR:
OpenTok: System.IO.FileLoadException: Could not load file or assembly 'JWT, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'JWT, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
   at OpenTokSDK.Util.HttpClient.GenerateJwt(Int32 key, String secret, Int32 expiryPeriod)
   at OpenTokSDK.Util.HttpClient.GetCommonHeaders()
   at OpenTokSDK.Util.HttpClient.GetRequestHeaders(Dictionary`2 headers)
   at OpenTokSDK.Util.HttpClient.DoRequest(String url, Dictionary`2 specificHeaders, Dictionary`2 bodyData)
   at OpenTokSDK.OpenTok.CreateSession(String location, MediaMode mediaMode, ArchiveMode archiveMode)
   at eTutorServer.eTutorService.userIdentification(Int32 handle, String strData, String[] sAry) in D:\Data\CADE.Net\eTutorServer\eTutorServer\eTutorService.cs:line 1514

=== Pre-bind state information ===
LOG: DisplayName = JWT, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///D:/Data/CADE.Net/eTutorServer/eTutorServer/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : OpenTok, Version=3.1.6873.25151, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Data\CADE.Net\eTutorServer\eTutorServer\bin\Debug\eTutorServer.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///D:/Data/CADE.Net/eTutorServer/eTutorServer/bin/Debug/JWT.DLL.
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Похоже, что у меня может быть проблема с версионированием JWT, поскольку она ссылается на 2.0.0.0 в сообщение об ошибке, пока у меня установлена ​​6.1.0 и в packages.config. Тем не менее, я не знаю, почему он показывает 2.0.0.0 или как это исправить.

1 Ответ

0 голосов
/ 01 марта 2020

Комментарии jdweng привели прямо к ответу. OpenTok не работает с 6.1.0, удаление исправило проблему. С тех пор опубликовал проблему с TokBox, чтобы выяснить, почему она не работает.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...