当我执行我的应用程序时,它从以下错误中的 Newtonsoft.Json 12.0.0.0 dll 引发错误:
Http Error 500 :
{
"Message":"An error has occurred.",
"ExceptionMessage":"Type System.Collections.Hashtable& is not a dictionary."
}
当我使用 Newtonsoft.Json 11.0.0.0 dll 时,它工作正常。
下面是从Swagger UI(http://localhost:54738/swagger/ui/index)调用的API方法:
[HttpGet]
public SortedList<int, XElement> getVariableStates(string sInstanceID, [FromBody] ref Hashtable oVarsDic)
{
}
更新到Newtonsoft.Json 12.0.0.0 dll后,我收到HashTable异常。