Python flask app with 4 endpoints, 3 of them works fine.
Main one, that handles GraphQL query crushes with 500 Internal server error.
The application works on IIS 8.5 with wfastcgi.py module.
IIS error handler shows this stack:
Warning — MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName — FastCgiModule
Notification — EXECUTE_REQUEST_HANDLER
HttpStatus — 500
HttpReason — INTERNAL SERVER ERROR
HttpSubStatus — 0
ErrorCode — The operation completed successfully. (0x0)
ConfigExceptionInfo
I launched source on flask dev server, and GraphQL handler is working as it used to be.
Founded some solutions about disabling in IIS config Custom Error — not working for me.
By the way, requests on this endpoint, that must cause client errors ( bad request, UNAUTHORIZED, forbidden ) resolves as they used to be.
Related
in azure web sites logs,
we see from time to time,
http error code 400 (HttpStatus) with HttpSubStatus 607.
the description is empty for this HttpSubStatus.
can you help describe the reason for IIS logging HttpSubStatus 607?
what can fix this, as this is an IIS error, and not webapp ?
the internet is silent about HttpSubStatus 607.
So we have a simple .net core 5.0 service that only serves some simple pages with mvc. We are starting to get 400 Errors (details below) on some of the requests. Our frontend is embedded in an iframe which forces us to use our own domain for our api-calls. The 400 errors disappears when we use the azure internal-urls. (*.azurewebsites.net instead of *.ourdomain.net). When I get to the "diagnose and solve problems" -> "availability and performance" -> HTTP 4XX ERRORS i can se below errors. Any ideas on what can cause this error?
Bad Request. The request could not be understood by the server due to malformed syntax. The client should not repeat the request without modifications.
So, the biggest problem above is that we do not get the correct errormessage. After a lot of experimentation we activated the ConnectionLogging for Kestrel.
WebHost.CreateDefaultBuilder(args)
.UseKestrel(options =>
{
options.ConfigureEndpointDefaults(listenOptions =>
{
listenOptions.UseConnectionLogging();
});
})
And after that we found some more intressting logs. One that said:
Connection id "0HMFSA73IA4LS" bad request data: "Malformed request: invalid headers."
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Malformed request: invalid headers.
After some more investigation we could diff a succesful request from a failing request. And the problem was related to the certificate of *.ourdomain.se. In a part of the certificate we hade a string thats named "Stockholms län" in the cases where it failed the string decoded to l�n and when it succeeded the string decoded to l%C3%A4n. We are now investigating if this is a load balancer problem. But this app is running hostingmodel outofprocess. By changing this to inprocess and wrap our Kestrel in IIS the errors disapears.
I am getting HTTP 400- Header too long error, I have tried most of solution over internet, but none of them seemed to be working (solutions are like adding reg entries, etc).
I have a sample web application which is calling a web api on my system, but I am getting below error in HTTPERR log file:
2019-11-16 16:58:59 ::1%0 1213 ::1%0 80 HTTP/1.1 GET
/WebApplication2/api/values - 400 - RequestLength -
Here is my code which is calling the web API:
HttpWebRequest GETRequest = (HttpWebRequest)WebRequest.Create(URL);
GETRequest.Method = "GET";
GETRequest.ContentType = "application/json";
GETRequest.Headers.Add("Authorization", "<Something Big value>");
WebResponse GETResponse = await GETRequest.GetResponseAsync();
It is recommended to capture ETL log via
https://blogs.msdn.microsoft.com/wndp/2007/01/18/event-tracing-in-http-sys-part-1-capturing-a-trace/
Then you could use network monitor to analyze both request payload and etl log.
It will help you find the root cause.
Besides, can you find the 400 error in IIS log? Now that the 400 error appear in httperr log. It looks like http.sys blocked the request before it reach IIS server.
If you can find the 400 error in IIS , then you could try to modify the limitation in system.web/httpRuntime and request filter.
If the 400 error only can be found in httperr log. Then you may have to try to make some change in http.sys registry.
https://support.microsoft.com/en-us/help/820129/http-sys-registry-settings-for-windows
Please remember to reboot server to activate these registry!
IIS ARR reverse proxy implementation is failing after my top level application in integrated with OKTA SSO. The OKTA integration uses OWIN modules and WS-Federtaion protocol.The back-end WebSphere app server is logging a socketTimeout exception and the FRT logs on IIS are pasted below.
MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName ApplicationRequestRouting Notification 128 HttpStatus 500 HttpReason Internal Server Error HttpSubStatus 0 ErrorCode 0 ConfigExceptionInfo Notification EXECUTE_REQUEST_HANDLER ErrorCode The operation completed successfully. (0x0)
And also two steps up, the General_Read_entity_end shows Bytes received as zero.
-GENERAL_READ_ENTITY_END
BytesReceived 0 ErrorCode 2147942438 ErrorCode Reached the end of the file. (0x80070026)
I've put the request.InsertEntityBody(); in both Application_BeginRequest and EndRequest as per IIS7 Application Request Routing (arr reverse proxy) combined with managed module - time out but it didn't help.
IIS 7.5, ARR 2.0, URL Rewrite 2.0, IBM WebSphere 7.0
Any other ideas?
Thanks
The issue is partially fixed by using request.InsertEntityBody() in "Application_AuthenticateRequest" event. Now the Initial page load is successful from the back-end servers. But the events like refresh and button clicks doesn't work. There is no error, the http status is 200 in both fiddler and FRT logs. However the Body column on fiddler shows 0 bytes.
I have a C# based webAPI hosted on Azure WebApp.
Sporadically, the HTTP OPTIONS call fails with a 500 error.
The OPTIONS call is not handled by our code. So I assume the server handles it by itself.
I tried enabling logs but both event log and web server logs does not print anything other than that it failed with a 500 error.
Any ideas why this would happen?.
Update:
I see only the below error messages in the web server logs. No details
Additionally I added code in my webAPI to handle options call, but the code does not go there. Not sure if I need to enable/disable something in web.confi.
2017-08-31 11:49:39 xxx.mywebsite.com OPTIONS /api/apiname StartDate=2017-08-25&EndDate=2017-08-31&X-ARR-LOG-ID=d86ffe7f-32c9-410b-8116-65833d5af7b9 443 - xxx.xxx.xxx.xxx Mozilla/5.0+(Windows+NT+6.1;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/60.0.3112.113+Safari/537.36 - www.website.com 500 121 0 636 1612 230013