JSONリクエストが大きすぎてデシリアライズできないという例外が発生しました。 MVCアプリケーションは現在、JSONデータをデシリアライズ問題がないJson.Netを使用してカスタムモデルバインダーを持ってJsonValueProviderFactoryが「要求が大きすぎます」を返します
それはJsonValueProviderFactoryから来ています....。しかし、私はデフォルトのJSON値プロバイダがトリプアップしていると仮定していますか?それに奇妙な限界がありますか?
MVC4の以前のビルドを使用している場合、大量のJSONに問題はなかったので、MVC4の最新リリースと関係があるかもしれません。
実際のjson値バインダーの設定を変更する方法はありますか?
私はそれが辞書に変換しますいくつかのカスタムのことだ印象を得る http://haacked.com/archive/2011/06/30/whatrsquos-the-difference-between-a-value-provider-and-model-binder.aspxで行く
....私はそれまたは私は変更することができます任意の設定がある場合は関連するすべてのソースコードを見つけることができませんか?
代わりに使用できる別のValueBinderがありますか?
または他のオプションはありますか?
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
をし、悲しげにあなただけのC#でstirngを分割する方法を答える誰かが取得されます。このための評判の小さな量を取得バケツロード:)ありがとう!興味深いことに、maxJsonLengthを大きくするだけではうまくいかなかった。私はデフォルトのJson Valueバインダーに欠陥があるかもしれないという気持ちを持っています –
私のカスタムモデルのバインダーはすべてを処理しているので、私はremoveを呼び出しました。私はすべてをデシリアライズすることはしたくない! –
JSON.NETで 'string'をデシリアライズするとどうなりますか?文字列が大きすぎるとエラーが発生しますか?私が取得年代を過ごしてきた..... web.configファイルの変更が働いていなかったので、私はあなたの例を使用し、私はむしろ3. –