There are a few questions and answers around the average error 411. But mine is a bit strange: we have a Testserver and a productive one. The error that I describe occurs only on the testerver server, which has exactly the same code as produtive (except for connection strings). We call WebMethod in the code behind:
[WebMethod]
public static object GetEnterEditModeObject()
{
object btnId = HttpContext.Current.Session[Constants.Session.RoleEditBtnClientId.ToString()];
var indRole = (V_WFA_ROLES)HttpContext.Current.Session[Constants.Session.RoleCurrentDatarow.ToString()];
if (btnId != null && indRole != null)
{
var result = new
{
btnId,
};
HttpContext.Current.Session[Constants.Session.RoleCurrentDatarow.ToString()] = null;
HttpContext.Current.Session[Constants.Session.RoleEditBtnClientId.ToString()] = null;
return result;
}
return null;
}
Nothing special here: we read two values from the session, if there are any, we create a new object, clear the sessions and return the object, otherwise we just return null.
This worked fine for a long time, but now we get the error that I mentioned above. Since he is still working on production, I can easily hide it, and I get these two headers:
HTTP/1.1 411 Length Required
Date: Mon, 24 Feb 2014 13:10:40 GMT
Server: Apache
Content-Length: 344
X-FRAME-OPTIONS: SAMEORIGIN
Connection: close
Content-Type: text/html; charset=us-ascii
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
X-UA-Compatible: IE=9; IE=8
Date: Mon, 24 Feb 2014 13:12:22 GMT
Content-Length: 10
Via: SomeURL
, , .
- , ? , , ? , / ?
!
: ,
[ScriptMethod(UseHttpGet=true, ResponseFormat = ResponseFormat.Json)]
Web-,
HTTP/1.1 303 See Other
Date: Mon, 24 Feb 2014 17:04:33 GMT
Server: Apache
Content-Length: 196
Location: /error_path/400.html?al_req_id=Uwt7oX8AAAEAAGijHI4AAAYG
X-FRAME-OPTIONS: SAMEORIGIN
Keep-Alive: timeout=10, max=500
Connection: Keep-Alive
Content-Type: text/html
, error_path, Fiddler , JavaScript .
, , , , , .
IIS, ?
Edith2: , , . , : , , !