Tag Archives: 500

IIS 7.5, ASP.NET MVC. HTTP error 500 (internal server error), but debugging does not enter the background, the browser only reports 500 errors

Bugs, such as:
IIS 7.5, ASP.NET MVC. HTTP Error 500 (Internal Server Error) uploadify uploads images, the browser only reported 500 errors, the progress bar does not move, but debugging does not enter the background
After several days of searching, I could not debug the source of the error. I also wondered whether the maximum byte limit of the upload was limited. However, I finally found the prompt of foreign gods under Google and determined that it was this error.
http://stackoverflow.com/questions/17188930/iis-7-5-asp-net-mvc-http-error-500-internal-server-error-an-unexpected-cond
Solutions:
& lt; The httpRuntime requestValidationMode = “2.0” maxRequestLength = “100000”/& gt; The configuration file adds a maximum byte limit

Router DIO network request: dioerror[ DioErrorType.RESPONSE ]: HTTP status error [400] or [500]

DioError [DioErrorType.RESPONSE]: Http status error [400]

1) check if the request parameter is correct:

, for example, if the parameter value in the map is an array, the following code in the innerParticipateGroups and innerParticipators the value of the value can’t into the toString, otherwise it will be submitted to the 400

Map<String,dynamic> params = {
      "chamberId":resultId,
      "description":remark,
      "finishAt":1564979400000,
      "innerParticipateGroups":[],
      "innerParticipators":[],
      "name":meetingName,
      "reportId":"",
      "scheduleId":"",
      "startAt":1564975800000
    };

2) if above is correct, check the receive mode of parameters when get and post are called

see Dio(v2.1.0) GET request source code:

Future<Response<T>> get<T>(
    String path, {
    Map<String, dynamic> queryParameters,
    Options options,
    CancelToken cancelToken,
    ProgressCallback onReceiveProgress,
  }) {
    return request<T>(
      path,
      queryParameters: queryParameters,
      options: _checkOptions("GET", options),
      onReceiveProgress: onReceiveProgress,
      cancelToken: cancelToken,
    );
  }

queryParameters queryParameters

response = await dio.get(url, queryParameters: params);

POST source:

/// Handy method to make http POST request, which is a alias of  [Dio.request].
  Future<Response<T>> post<T>(
    String path, {
    data,
    Map<String, dynamic> queryParameters,
    Options options,
    CancelToken cancelToken,
    ProgressCallback onSendProgress,
    ProgressCallback onReceiveProgress,
  }) {
    return request<T>(
      path,
      data: data,
      options: _checkOptions("POST", options),
      queryParameters: queryParameters,
      cancelToken: cancelToken,
      onSendProgress: onSendProgress,
      onReceiveProgress: onReceiveProgress,
    );
  }

POST parameters data queryParameters; queryParameters; 400; queryParameters;

response = await dio.post(url, data : params);

DioError [dioerrortype.response]: Http status error [500]

Check if the header is set or set incorrectly

HttpGo() {
    dio = Dio(BaseOptions(
      baseUrl: 'https://www.***.com/',
      headers: getHeaders(),
      connectTimeout: 5000,
      receiveTimeout: 3000,
    ));
  }
  getHeaders () {
    return {
      'Accept':'application/json, text/plain, */*',
      'Content-Type':'application/json',
      'Authorization':"**",
      'User-Aagent':"4.1.0;android;6.0.1;default;A001",
      "HZUID":"2",
    };
  }

DioError [dioerrortype.response]: Http status error [415]

change the request parameter data format FormData to Map< String,dynamic> Try

if you think it will work for you, please click “like” to support it ~ thanks ~