Tôi nhận được một ngoại lệ rằng yêu cầu JSON quá lớn để được deserialized.JsonValueProviderFactory ném "yêu cầu quá lớn"
Nó đến từ JsonValueProviderFactory ....
Các MVC App hiện đã có một chất kết dính mô hình tùy chỉnh sử dụng Json.Net mà không có vấn đề deserializing dữ liệu json. Tuy nhiên tôi giả sử nhà cung cấp giá trị mặc định JSON đang vấp phải? hoặc có một số giới hạn kỳ lạ được tích hợp vào nó?
Có thể liên quan đến bản phát hành MVC4 mới nhất khi sử dụng bản dựng MVC4 trước đó không có vấn đề gì với số lượng lớn JSON.
Vì vậy, có cách nào để thay đổi các giá trị cài đặt của giá trị json thực tế không?
tôi bị ấn tượng đó là một số điều chỉnh có thể biến nó thành một cuốn từ điển .... Tôi không thể tìm thấy bất kỳ mã nguồn liên quan đến nó, hoặc nếu có bất kỳ cài đặt tôi có thể thay đổi?
Hoặc có một ValueBinder thay thế mà tôi có thể sử dụng không?
hoặc bất kỳ tùy chọn nào khác?
Server Error in '/' Application.
The JSON request was too large to be deserialized.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The JSON request was too large to be deserialized.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: The JSON request was too large to be deserialized.]
System.Web.Mvc.EntryLimitedDictionary.Add(String key, Object value) +464621
System.Web.Mvc.JsonValueProviderFactory.AddToBackingStore(EntryLimitedDictionary backingStore, String prefix, Object value) +413
System.Web.Mvc.JsonValueProviderFactory.AddToBackingStore(EntryLimitedDictionary backingStore, String prefix, Object value) +164
System.Web.Mvc.JsonValueProviderFactory.AddToBackingStore(EntryLimitedDictionary backingStore, String prefix, Object value) +164
System.Web.Mvc.JsonValueProviderFactory.AddToBackingStore(EntryLimitedDictionary backingStore, String prefix, Object value) +373
System.Web.Mvc.JsonValueProviderFactory.AddToBackingStore(EntryLimitedDictionary backingStore, String prefix, Object value) +164
System.Web.Mvc.JsonValueProviderFactory.GetValueProvider(ControllerContext controllerContext) +116
System.Web.Mvc.<>c__DisplayClassc.<GetValueProvider>b__7(ValueProviderFactory factory) +34
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +151
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +177
và buồn bã bạn chỉ nhận được một số lượng nhỏ của danh tiếng cho điều này, nơi người trả lời làm thế nào để chia một stirng trong C# sẽ nhận được tải thùng :) Cảm ơn! đã thực sự hữu ích ..... thú vị đủ chỉ làm cho maxJsonLength lớn hơn không hoạt động. Tôi có cảm giác có thể có lỗi trong giá trị Json Value binder mặc định –
Khi trình kết nối mô hình tùy chỉnh của tôi đang xử lý mọi thứ, tôi chỉ gọi là xóa. Tôi không muốn nhân đôi mọi thứ! –
Điều gì sẽ xảy ra nếu tôi gửi một chuỗi '' và deserialize nó bằng JSON.NET? Tôi có bao giờ gặp lỗi nếu chuỗi quá lớn không? –