Comments (4)
According to the MSDN Docs, the default value for MaxJsonLength is "2097152 characters, which is equivalent to 4 MB of Unicode string data."
You say that it's logging SOAP communications. What type of data are you transferring via SOAP? I mean are you sending messages that you would expect to exceed 3 or 4 MB?
Judging by where you say that the error is happening (when viewing an error, not logging the error), I'm thinking that this is the call to Error.ToDetailedJson()
, which is written out to the webpage in a script tag, which the browser then interprets as a JavaScript object. But if this were to output more than 4 MB of JSON then you might end up having issues with your browser trying to deal with something that large (not to mention a long load time if it's having to be served over an internet connection).
Don't get me wrong, I'm not saying that you're doing anything wrong, just trying to help and figure out what you're trying to do. 😉
from stackexchange.exceptional.
@CptRobby some messages that we receive go up to 15 MB because they can contain PDFs in bas64 form.
We're doing the following: every request, a number of SOAP calls are done. We keep these in a per-request log store. If the request is completed succesfully, the data is discarded. If not, we throw and log an exception that includes all SOAP calls for that request.
from stackexchange.exceptional.
I would personally not log that with the exception since that's a ton of data to rack up :) But if you must, that limit is adjustable. In your web.config
or app.config
here's the setting to up the that 2MB default limit:
<configuration>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="20000000"/>
</webServices>
</scripting>
</system.web.extensions>
</configuration>
from stackexchange.exceptional.
@NickCraver I agree it's not an ideal solution, they should be logged separately and the exception should just include an identifier. But time and budget were not on my side :) I'll try the config change, thanks.
from stackexchange.exceptional.
Related Issues (20)
- Exception Emails are not sent in asp.net core 3.1 razor pages HOT 1
- How can we log 404, 401, 403 status code type error in Database using StackExchange.Exceptional? HOT 1
- Is there a way to filter logs by Client IP? Want to prevent logging at all from certain IP addresses HOT 2
- No index on a Datetime field HOT 1
- Settings not loaded from the configuration file when running in a non-web environment HOT 1
- Exceptions: Copy from memory to store X on startup HOT 1
- Microsoft.Data.SqlClient
- Is NuGet abandonned? HOT 4
- Form logging doesn't include
- Could not load type MySqlConnection from assembly MySqlConnector HOT 4
- How to get HttpContext in GetCustomData? HOT 2
- Not logging to mysql database HOT 1
- Non Dev Environment - User Friendly Error Page HOT 4
- Update docs to reference new Settings.Current location HOT 3
- Could JSONErrorStore create the Path if it doesn't exist yet? HOT 2
- Request - Ability to Mask or Exclude Sensitive Form Values from Logging and Emails HOT 2
- Not logging exceptions from Blazor
- Add support for logging levels HOT 1
- Where to view Request Body in Exceptional logs HOT 3
- Any way to log the InnerException from exceptions? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stackexchange.exceptional.