久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      • <bdo id='WRyZH'></bdo><ul id='WRyZH'></ul>

      <tfoot id='WRyZH'></tfoot>
    1. <small id='WRyZH'></small><noframes id='WRyZH'>

    2. <i id='WRyZH'><tr id='WRyZH'><dt id='WRyZH'><q id='WRyZH'><span id='WRyZH'><b id='WRyZH'><form id='WRyZH'><ins id='WRyZH'></ins><ul id='WRyZH'></ul><sub id='WRyZH'></sub></form><legend id='WRyZH'></legend><bdo id='WRyZH'><pre id='WRyZH'><center id='WRyZH'></center></pre></bdo></b><th id='WRyZH'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='WRyZH'><tfoot id='WRyZH'></tfoot><dl id='WRyZH'><fieldset id='WRyZH'></fieldset></dl></div>

      <legend id='WRyZH'><style id='WRyZH'><dir id='WRyZH'><q id='WRyZH'></q></dir></style></legend>
    3. 調用 JsonConvert.DeserializeObject&lt;T&gt; 時缺少

      System.Security.Permissions missing when invoking JsonConvert.DeserializeObjectlt;Tgt; in .NET Core 2.0(調用 JsonConvert.DeserializeObjectlt;Tgt; 時缺少 System.Security.Permissions在 .NET Core 2.0 中) - IT屋-程序員軟件開發(fā)技術

          <tfoot id='e5ip9'></tfoot>

            <i id='e5ip9'><tr id='e5ip9'><dt id='e5ip9'><q id='e5ip9'><span id='e5ip9'><b id='e5ip9'><form id='e5ip9'><ins id='e5ip9'></ins><ul id='e5ip9'></ul><sub id='e5ip9'></sub></form><legend id='e5ip9'></legend><bdo id='e5ip9'><pre id='e5ip9'><center id='e5ip9'></center></pre></bdo></b><th id='e5ip9'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='e5ip9'><tfoot id='e5ip9'></tfoot><dl id='e5ip9'><fieldset id='e5ip9'></fieldset></dl></div>
          1. <legend id='e5ip9'><style id='e5ip9'><dir id='e5ip9'><q id='e5ip9'></q></dir></style></legend>
              <bdo id='e5ip9'></bdo><ul id='e5ip9'></ul>

                <tbody id='e5ip9'></tbody>

              <small id='e5ip9'></small><noframes id='e5ip9'>

              1. 本文介紹了調用 JsonConvert.DeserializeObject&lt;T&gt; 時缺少 System.Security.Permissions在 .NET Core 2.0 中的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我目前正在考慮使用 .NET Core 2.0,以便可以在多個平臺上運行我的應用程序.

                I am currently looking at using .NET Core 2.0 so that I can run my app on multiple platforms.

                我需要做的一件事是獲取一個傳入的字符串并將其反序列化為一個對象.例如

                One thing I need to do is take an incoming string and deseralise it into an object. e.g.

                var resultingObject = JsonConvert.DeserializeObject<MyDataContract>(request);
                

                在完整的 .NET 中,這將運行并返回我的對象??.但是在 .NET Core 2.0 中出現以下異常

                In full .NET, this would run and return me my object. However in .NET Core 2.0 I get the following exception

                Could not load file or assembly 'System.Security.Permissions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
                at Newtonsoft.Json.Serialization.JsonTypeReflector.get_DynamicCodeGeneration()
                 at Newtonsoft.Json.Serialization.JsonTypeReflector.get_ReflectionDelegateFactory()
                 at Newtonsoft.Json.Serialization.DefaultContractResolver.GetDefaultCreator(Type createdType)
                 at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract(JsonContract contract)
                 at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateObjectContract(Type objectType)
                 at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType)
                 at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type)
                 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
                 at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
                 at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
                 at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
                

                經過一番閱讀后,我在 StackOverflow 上發(fā)現了這一點,這表明 .NET Core 中不允許這種操作 https://stackoverflow.com/a/38385774/1211743

                After some reading around I found this on StackOverflow which suggests that this kind of operation is not permitted in .NET Core https://stackoverflow.com/a/38385774/1211743

                有人有什么見解嗎?

                推薦答案

                這是由于對 .NET Core 的工作原理缺乏了解.我打開了 csproj 并添加了對所需文件System.Security.Permissions"的引用并重新加載了項目.至此,nuget 解決了.Json.NET 現在按預期工作.

                This was due to a lack of understanding of how .NET Core works. I opened up the csproj and added a reference to the required file 'System.Security.Permissions' and reloaded the project. At this point, nuget resolved it. Json.NET now works as expected.

                這篇關于調用 JsonConvert.DeserializeObject&lt;T&gt; 時缺少 System.Security.Permissions在 .NET Core 2.0 中的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                Parse malformed XML(解析格式錯誤的 XML)

                    <bdo id='Aenql'></bdo><ul id='Aenql'></ul>

                    • <legend id='Aenql'><style id='Aenql'><dir id='Aenql'><q id='Aenql'></q></dir></style></legend>
                    • <i id='Aenql'><tr id='Aenql'><dt id='Aenql'><q id='Aenql'><span id='Aenql'><b id='Aenql'><form id='Aenql'><ins id='Aenql'></ins><ul id='Aenql'></ul><sub id='Aenql'></sub></form><legend id='Aenql'></legend><bdo id='Aenql'><pre id='Aenql'><center id='Aenql'></center></pre></bdo></b><th id='Aenql'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Aenql'><tfoot id='Aenql'></tfoot><dl id='Aenql'><fieldset id='Aenql'></fieldset></dl></div>
                        <tbody id='Aenql'></tbody>

                          <tfoot id='Aenql'></tfoot>

                        • <small id='Aenql'></small><noframes id='Aenql'>

                          主站蜘蛛池模板: 91精品国产91久久久久久吃药 | 成人国产精品久久 | 久久精品视频网站 | 日本一区二区高清不卡 | 精品一二区 | 国产免费视频 | 午夜在线视频 | 亚洲高清成人 | 成人亚洲精品久久久久软件 | 欧美激情国产精品 | 日本一级淫片免费啪啪3 | 久久免费观看一级毛片 | 久久这里只有精品首页 | 人人做人人澡人人爽欧美 | 日韩成人精品在线观看 | 日韩欧美精品一区 | 久久综合久色欧美综合狠狠 | 国产污视频在线 | 99福利视频导航 | 欧美视频第二页 | 久久激情视频 | 免费看淫片| 亚洲国产精品久久久 | 亚洲精选一区二区 | 国产三级大片 | 欧美成人精品一区 | 成人性视频免费网站 | 国产欧美一区二区三区日本久久久 | 一本一道久久a久久精品综合 | 亚洲精品乱码久久久久久按摩 | 午夜天堂| 青青久在线视频 | 日韩精品一区二区三区视频播放 | 亚洲一区二区三区在线 | 看片91| 亚洲人在线播放 | 99久久久无码国产精品 | 九九99久久 | 欧美日韩国产在线 | 天堂av免费观看 | 偷拍自拍第一页 |