Module set response error status

I'm having this problem. Sorry if I posted the actual error page of my application here. I hope I can get some help.

I’m having this problem. Sorry if I posted the actual error page of my application here. I hope I can get some help.

I don’t know what’s causing this error. BTW, my application is in MVC 4 Code First. It also use Lambda. IIS version is 8 and it’s running on Windows 8.

HTTP Error 500.0 — Internal Server Error

The page cannot be displayed because an internal server error has occurred.

<fieldset>

Most likely causes:

  • IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
  • IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
  • IIS was not able to process configuration for the Web site or application.
  • The authenticated user does not have permission to use this DLL.
  • The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.

</fieldset>

<fieldset>

Things you can try:

  • Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server’s machine account.
  • Check the event logs to see if any additional information was logged.
  • Verify the permissions for the DLL.
  • Install the .NET Extensibility feature if the request is mapped to a managed handler.
  • Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.

</fieldset>

<fieldset>

Detailed Error Information:

Module    ManagedPipelineHandler
Notification    ExecuteRequestHandler
Handler    System.Web.Mvc.MvcHandler
Error Code    0x00000000
Requested URL    http://localhost:80/PLIA-MIB/Member
Physical Path    C:inetpubwwwrootPLIA-MIBMIB.Web.Member
Logon Method    Forms
Logon User    jbllanda1
Request Tracing Directory    C:inetpublogsFailedReqLogFiles

</fieldset>

<fieldset>

More Information:

This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.

View more information »

Microsoft Knowledge Base Articles:

  • 294807

</fieldset>

I also enabled error logging in IIS and here’s the logs.

Note: I replaced the actual website’s domain to localhost.

No. EventName Details Time
1. NOTIFY_MODULE_END ModuleName=»FailedRequestsTracingModule», Notification=»BEGIN_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.040
2. NOTIFY_MODULE_START ModuleName=»ConfigurationValidationModule», Notification=»BEGIN_REQUEST», fIsPostNotification=»false» 12:22:45.040
3. NOTIFY_MODULE_END ModuleName=»ConfigurationValidationModule», Notification=»BEGIN_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.040
4. NOTIFY_MODULE_START ModuleName=»IsapiFilterModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»false» 12:22:45.040
5. NOTIFY_MODULE_END ModuleName=»IsapiFilterModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.040
6. NOTIFY_MODULE_START ModuleName=»CertificateMappingAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»false» 12:22:45.040
7. AUTH_START AuthTypeSupported=»MapCliCert» 12:22:45.040
8. AUTH_END 12:22:45.040
9. NOTIFY_MODULE_END ModuleName=»CertificateMappingAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.040
10. NOTIFY_MODULE_START ModuleName=»BasicAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»false» 12:22:45.040
11. AUTH_START AuthTypeSupported=»Basic» 12:22:45.040
12. AUTH_END 12:22:45.040
13. NOTIFY_MODULE_END ModuleName=»BasicAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.040
14. NOTIFY_MODULE_START ModuleName=»WindowsAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»false» 12:22:45.040
15. AUTH_START AuthTypeSupported=»NT» 12:22:45.040
16. AUTH_END 12:22:45.040
17. NOTIFY_MODULE_END ModuleName=»WindowsAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.040
18. NOTIFY_MODULE_START ModuleName=»DigestAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»false» 12:22:45.040
19. AUTH_START AuthTypeSupported=»Digest» 12:22:45.040
20. AUTH_END 12:22:45.040
21. NOTIFY_MODULE_END ModuleName=»DigestAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.040
22. NOTIFY_MODULE_START ModuleName=»IISCertificateMappingAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»false» 12:22:45.040
23. AUTH_START AuthTypeSupported=»MapCliCert» 12:22:45.040
24. AUTH_END 12:22:45.040
25. NOTIFY_MODULE_END ModuleName=»IISCertificateMappingAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.040
26. NOTIFY_MODULE_START ModuleName=»ScriptModule-4.0″, Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»false» 12:22:45.040
27. AspNetStart Data1=»GET», Data2=»/PLIA-MIB/Member/», Data3=»» 12:22:45.040
28. AspNetAppDomainEnter Data1=»/LM/W3SVC/1/ROOT/PLIA-MIB/Member-54-130361629638376123″ 12:22:45.040
29. AspNetStartHandler Data1=»ASP.global_asax», Data2=»Start» 12:22:45.040
30. AspNetPipelineEnter Data1=»System.Web.Handlers.ScriptModule» 12:22:45.040
31. AspNetPipelineLeave Data1=»System.Web.Handlers.ScriptModule» 12:22:45.040
32. NOTIFY_MODULE_END ModuleName=»ScriptModule-4.0″, Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.040
33. NOTIFY_MODULE_START ModuleName=»WindowsAuthentication», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»false» 12:22:45.040
34. AspNetPipelineEnter Data1=»System.Web.Security.WindowsAuthenticationModule» 12:22:45.040
35. AspNetPipelineLeave Data1=»System.Web.Security.WindowsAuthenticationModule» 12:22:45.040
36. NOTIFY_MODULE_END ModuleName=»WindowsAuthentication», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.040
37. NOTIFY_MODULE_START ModuleName=»FormsAuthentication», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»false» 12:22:45.040
38. AspNetPipelineEnter Data1=»System.Web.Security.FormsAuthenticationModule» 12:22:45.040
39. USER_SET AuthType=»Forms», UserName=»jbllanda1″, SupportsIsInRole=»true» 12:22:45.056
40. AspNetPipelineLeave Data1=»System.Web.Security.FormsAuthenticationModule» 12:22:45.056
41. NOTIFY_MODULE_END ModuleName=»FormsAuthentication», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
42. NOTIFY_MODULE_START ModuleName=»AnonymousAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»false» 12:22:45.056
43. NOTIFY_MODULE_END ModuleName=»AnonymousAuthenticationModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
44. NOTIFY_MODULE_START ModuleName=»IsapiFilterModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»true» 12:22:45.056
45. FILTER_AUTH_COMPLETE_START 12:22:45.056
46. FILTER_AUTH_COMPLETE_END 12:22:45.056
47. NOTIFY_MODULE_END ModuleName=»IsapiFilterModule», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»true», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
48. NOTIFY_MODULE_START ModuleName=»ServiceModel-4.0″, Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»true» 12:22:45.056
49. AspNetPipelineEnter Data1=»System.ServiceModel.Activation.ServiceHttpModule» 12:22:45.056
50. AspNetPipelineLeave Data1=»System.ServiceModel.Activation.ServiceHttpModule» 12:22:45.056
51. NOTIFY_MODULE_END ModuleName=»ServiceModel-4.0″, Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»true», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
52. NOTIFY_MODULE_START ModuleName=»DefaultAuthentication», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»true» 12:22:45.056
53. AspNetPipelineEnter Data1=»System.Web.Security.DefaultAuthenticationModule» 12:22:45.056
54. AspNetPipelineLeave Data1=»System.Web.Security.DefaultAuthenticationModule» 12:22:45.056
55. NOTIFY_MODULE_END ModuleName=»DefaultAuthentication», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»true», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
56. NOTIFY_MODULE_START ModuleName=»RoleManager», Notification=»AUTHENTICATE_REQUEST», fIsPostNotification=»true» 12:22:45.056
57. AspNetPipelineEnter Data1=»System.Web.Security.RoleManagerModule» 12:22:45.056
58. AspNetPipelineLeave Data1=»System.Web.Security.RoleManagerModule» 12:22:45.056
59. NOTIFY_MODULE_END ModuleName=»RoleManager», Notification=»AUTHENTICATE_REQUEST», fIsPostNotificationEvent=»true», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
60. NOTIFY_MODULE_START ModuleName=»UrlAuthorizationModule», Notification=»AUTHORIZE_REQUEST», fIsPostNotification=»false» 12:22:45.056
61. NOTIFY_MODULE_END ModuleName=»UrlAuthorizationModule», Notification=»AUTHORIZE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
62. NOTIFY_MODULE_START ModuleName=»UrlAuthorization», Notification=»AUTHORIZE_REQUEST», fIsPostNotification=»false» 12:22:45.056
63. AspNetPipelineEnter Data1=»System.Web.Security.UrlAuthorizationModule» 12:22:45.056
64. AspNetPipelineLeave Data1=»System.Web.Security.UrlAuthorizationModule» 12:22:45.056
65. NOTIFY_MODULE_END ModuleName=»UrlAuthorization», Notification=»AUTHORIZE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
66. NOTIFY_MODULE_START ModuleName=»FileAuthorization», Notification=»AUTHORIZE_REQUEST», fIsPostNotification=»false» 12:22:45.056
67. AspNetPipelineEnter Data1=»System.Web.Security.FileAuthorizationModule» 12:22:45.056
68. AspNetPipelineLeave Data1=»System.Web.Security.FileAuthorizationModule» 12:22:45.056
69. NOTIFY_MODULE_END ModuleName=»FileAuthorization», Notification=»AUTHORIZE_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
70. NOTIFY_MODULE_START ModuleName=»HttpCacheModule», Notification=»RESOLVE_REQUEST_CACHE», fIsPostNotification=»false» 12:22:45.056
71. OUTPUT_CACHE_LOOKUP_START 12:22:45.056
72. OUTPUT_CACHE_LOOKUP_END Result=»NOT_FOUND» 12:22:45.056
73. NOTIFY_MODULE_END ModuleName=»HttpCacheModule», Notification=»RESOLVE_REQUEST_CACHE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
74. NOTIFY_MODULE_START ModuleName=»OutputCache», Notification=»RESOLVE_REQUEST_CACHE», fIsPostNotification=»false» 12:22:45.056
75. AspNetPipelineEnter Data1=»System.Web.Caching.OutputCacheModule» 12:22:45.056
76. AspNetPipelineLeave Data1=»System.Web.Caching.OutputCacheModule» 12:22:45.056
77. NOTIFY_MODULE_END ModuleName=»OutputCache», Notification=»RESOLVE_REQUEST_CACHE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.056
78. NOTIFY_MODULE_START ModuleName=»UrlRoutingModule-4.0″, Notification=»RESOLVE_REQUEST_CACHE», fIsPostNotification=»true» 12:22:45.056
79. AspNetPipelineEnter Data1=»System.Web.Routing.UrlRoutingModule» 12:22:45.056
80. AspNetPipelineLeave Data1=»System.Web.Routing.UrlRoutingModule» 12:22:45.118
81. NOTIFY_MODULE_END ModuleName=»UrlRoutingModule-4.0″, Notification=»RESOLVE_REQUEST_CACHE», fIsPostNotificationEvent=»true», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.118
82. NOTIFY_MODULE_START ModuleName=»__DynamicModule_System.Web.WebPages.WebPageHttpModule, System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_427c89ca-9ae7-47af-bc32-6662393a5cb5″, Notification=»RESOLVE_REQUEST_CACHE», fIsPostNotification=»true» 12:22:45.118
83. AspNetPipelineEnter Data1=»System.Web.WebPages.WebPageHttpModule» 12:22:45.118
84. AspNetPipelineLeave Data1=»System.Web.WebPages.WebPageHttpModule» 12:22:45.134
85. NOTIFY_MODULE_END ModuleName=»__DynamicModule_System.Web.WebPages.WebPageHttpModule, System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_427c89ca-9ae7-47af-bc32-6662393a5cb5″, Notification=»RESOLVE_REQUEST_CACHE», fIsPostNotificationEvent=»true»,
NotificationStatus=»NOTIFICATION_CONTINUE»
12:22:45.134
86. NOTIFY_MODULE_START ModuleName=»__DynamicModule_System.Web.Optimization.BundleModule, System.Web.Optimization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_974db8ba-f9b8-4683-bb50-404717242fc6″, Notification=»RESOLVE_REQUEST_CACHE»,
fIsPostNotification=»true»
12:22:45.134
87. AspNetPipelineEnter Data1=»System.Web.Optimization.BundleModule» 12:22:45.134
88. AspNetPipelineLeave Data1=»System.Web.Optimization.BundleModule» 12:22:45.134
89. NOTIFY_MODULE_END ModuleName=»__DynamicModule_System.Web.Optimization.BundleModule, System.Web.Optimization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_974db8ba-f9b8-4683-bb50-404717242fc6″, Notification=»RESOLVE_REQUEST_CACHE»,
fIsPostNotificationEvent=»true», NotificationStatus=»NOTIFICATION_CONTINUE»
12:22:45.134
90. NOTIFY_MODULE_START ModuleName=»StaticCompressionModule», Notification=»MAP_REQUEST_HANDLER», fIsPostNotification=»false» 12:22:45.134
91. NOTIFY_MODULE_END ModuleName=»StaticCompressionModule», Notification=»MAP_REQUEST_HANDLER», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.134
92. NOTIFY_MODULE_START ModuleName=»HttpRedirectionModule», Notification=»MAP_REQUEST_HANDLER», fIsPostNotification=»false» 12:22:45.134
93. NOTIFY_MODULE_END ModuleName=»HttpRedirectionModule», Notification=»MAP_REQUEST_HANDLER», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.134
94. NOTIFY_MODULE_START ModuleName=»ManagedPipelineHandler», Notification=»MAP_REQUEST_HANDLER», fIsPostNotification=»false» 12:22:45.134
95. AspNetMapHandlerEnter 12:22:45.134
96. HANDLER_CHANGED OldHandlerName=»ExtensionlessUrlHandler-Integrated-4.0″, NewHandlerName=»System.Web.Mvc.MvcHandler», NewHandlerModules=»ManagedPipelineHandler», NewHandlerScriptProcessor=»», NewHandlerType=»System.Web.Mvc.MvcHandler,
System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″
12:22:45.134
97. AspNetMapHandlerLeave 12:22:45.134
98. NOTIFY_MODULE_END ModuleName=»ManagedPipelineHandler», Notification=»MAP_REQUEST_HANDLER», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.134
99. NOTIFY_MODULE_START ModuleName=»Session», Notification=»REQUEST_ACQUIRE_STATE», fIsPostNotification=»false» 12:22:45.134
100. AspNetPipelineEnter Data1=»System.Web.SessionState.SessionStateModule» 12:22:45.134
101. AspNetSessionDataBegin 12:22:45.134
102. AspNetSessionDataEnd 12:22:45.556
103. MODULE_SET_RESPONSE_ERROR_STATUS
Warning
ModuleName=»Session», Notification=»REQUEST_ACQUIRE_STATE», HttpStatus=»500″, HttpReason=»Internal Server Error», HttpSubStatus=»0″, ErrorCode=»The operation completed successfully. (0x0)», ConfigExceptionInfo=»» 12:22:45.681
104. NOTIFY_MODULE_END ModuleName=»Session», Notification=»REQUEST_ACQUIRE_STATE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.681
105. NOTIFY_MODULE_START ModuleName=»Profile», Notification=»REQUEST_ACQUIRE_STATE», fIsPostNotification=»false» 12:22:45.681
106. AspNetPipelineEnter Data1=»System.Web.Profile.ProfileModule» 12:22:45.681
107. AspNetPipelineLeave Data1=»System.Web.Profile.ProfileModule» 12:22:45.681
108. NOTIFY_MODULE_END ModuleName=»Profile», Notification=»REQUEST_ACQUIRE_STATE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.681
109. NOTIFY_MODULE_START ModuleName=»ScriptModule-4.0″, Notification=»REQUEST_ACQUIRE_STATE», fIsPostNotification=»true» 12:22:45.681
110. AspNetPipelineEnter Data1=»System.Web.Handlers.ScriptModule» 12:22:45.681
111. AspNetPipelineLeave Data1=»System.Web.Handlers.ScriptModule» 12:22:45.681
112. NOTIFY_MODULE_END ModuleName=»ScriptModule-4.0″, Notification=»REQUEST_ACQUIRE_STATE», fIsPostNotificationEvent=»true», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.681
113. NOTIFY_MODULE_START ModuleName=»ManagedPipelineHandler», Notification=»EXECUTE_REQUEST_HANDLER», fIsPostNotification=»false» 12:22:45.681
114. AspNetPipelineEnter Data1=»System.Web.ImplicitAsyncPreloadModule» 12:22:45.681
115. AspNetPipelineLeave Data1=»System.Web.ImplicitAsyncPreloadModule» 12:22:45.681
116. AspNetHttpHandlerEnter 12:22:45.681
117. NOTIFY_MODULE_END ModuleName=»ManagedPipelineHandler», Notification=»EXECUTE_REQUEST_HANDLER», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
118. NOTIFY_MODULE_START ModuleName=»Session», Notification=»RELEASE_REQUEST_STATE», fIsPostNotification=»false» 12:22:45.759
119. AspNetPipelineEnter Data1=»System.Web.SessionState.SessionStateModule» 12:22:45.759
120. AspNetPipelineLeave Data1=»System.Web.SessionState.SessionStateModule» 12:22:45.759
121. NOTIFY_MODULE_END ModuleName=»Session», Notification=»RELEASE_REQUEST_STATE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
122. NOTIFY_MODULE_START ModuleName=»DynamicCompressionModule», Notification=»RELEASE_REQUEST_STATE», fIsPostNotification=»true» 12:22:45.759
123. NOTIFY_MODULE_END ModuleName=»DynamicCompressionModule», Notification=»RELEASE_REQUEST_STATE», fIsPostNotificationEvent=»true», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
124. NOTIFY_MODULE_START ModuleName=»AspNetFilterModule», Notification=»UPDATE_REQUEST_CACHE», fIsPostNotification=»false» 12:22:45.759
125. NOTIFY_MODULE_END ModuleName=»AspNetFilterModule», Notification=»UPDATE_REQUEST_CACHE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
126. NOTIFY_MODULE_START ModuleName=»HttpCacheModule», Notification=»UPDATE_REQUEST_CACHE», fIsPostNotification=»false» 12:22:45.759
127. OUTPUT_CACHE_UPDATE_START CachePolicy=»NO_CACHE», TimeToLive=»0″ 12:22:45.759
128. OUTPUT_CACHE_UPDATE_END Result=»NOT_FREQUENTLY_HIT» 12:22:45.759
129. NOTIFY_MODULE_END ModuleName=»HttpCacheModule», Notification=»UPDATE_REQUEST_CACHE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
130. NOTIFY_MODULE_START ModuleName=»OutputCache», Notification=»UPDATE_REQUEST_CACHE», fIsPostNotification=»false» 12:22:45.759
131. AspNetPipelineEnter Data1=»System.Web.Caching.OutputCacheModule» 12:22:45.759
132. AspNetPipelineLeave Data1=»System.Web.Caching.OutputCacheModule» 12:22:45.759
133. NOTIFY_MODULE_END ModuleName=»OutputCache», Notification=»UPDATE_REQUEST_CACHE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
134. NOTIFY_MODULE_START ModuleName=»AspNetFilterModule», Notification=»LOG_REQUEST», fIsPostNotification=»false» 12:22:45.759
135. NOTIFY_MODULE_END ModuleName=»AspNetFilterModule», Notification=»LOG_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
136. NOTIFY_MODULE_START ModuleName=»DynamicIpRestrictionModule», Notification=»END_REQUEST», fIsPostNotification=»false» 12:22:45.759
137. NOTIFY_MODULE_END ModuleName=»DynamicIpRestrictionModule», Notification=»END_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
138. NOTIFY_MODULE_START ModuleName=»ScriptModule-4.0″, Notification=»END_REQUEST», fIsPostNotification=»false» 12:22:45.759
139. AspNetPipelineEnter Data1=»System.Web.Handlers.ScriptModule» 12:22:45.759
140. AspNetPipelineLeave Data1=»System.Web.Handlers.ScriptModule» 12:22:45.759
141. NOTIFY_MODULE_END ModuleName=»ScriptModule-4.0″, Notification=»END_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
142. NOTIFY_MODULE_START ModuleName=»FormsAuthentication», Notification=»END_REQUEST», fIsPostNotification=»false» 12:22:45.759
143. AspNetPipelineEnter Data1=»System.Web.Security.FormsAuthenticationModule» 12:22:45.759
144. AspNetPipelineLeave Data1=»System.Web.Security.FormsAuthenticationModule» 12:22:45.759
145. NOTIFY_MODULE_END ModuleName=»FormsAuthentication», Notification=»END_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
146. NOTIFY_MODULE_START ModuleName=»RoleManager», Notification=»END_REQUEST», fIsPostNotification=»false» 12:22:45.759
147. AspNetPipelineEnter Data1=»System.Web.Security.RoleManagerModule» 12:22:45.759
148. AspNetPipelineLeave Data1=»System.Web.Security.RoleManagerModule» 12:22:45.759
149. NOTIFY_MODULE_END ModuleName=»RoleManager», Notification=»END_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
150. NOTIFY_MODULE_START ModuleName=»Profile», Notification=»END_REQUEST», fIsPostNotification=»false» 12:22:45.759
151. AspNetPipelineEnter Data1=»System.Web.Profile.ProfileModule» 12:22:45.759
152. AspNetPipelineLeave Data1=»System.Web.Profile.ProfileModule» 12:22:45.759
153. NOTIFY_MODULE_END ModuleName=»Profile», Notification=»END_REQUEST», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
154. NOTIFY_MODULE_START ModuleName=»__DynamicModule_System.Web.WebPages.WebPageHttpModule, System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_427c89ca-9ae7-47af-bc32-6662393a5cb5″, Notification=»END_REQUEST», fIsPostNotification=»false» 12:22:45.759
155. AspNetPipelineEnter Data1=»System.Web.WebPages.WebPageHttpModule» 12:22:45.759
156. AspNetPipelineLeave Data1=»System.Web.WebPages.WebPageHttpModule» 12:22:45.759
157. NOTIFY_MODULE_END ModuleName=»__DynamicModule_System.Web.WebPages.WebPageHttpModule, System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_427c89ca-9ae7-47af-bc32-6662393a5cb5″, Notification=»END_REQUEST», fIsPostNotificationEvent=»false»,
NotificationStatus=»NOTIFICATION_CONTINUE»
12:22:45.759
158. NOTIFY_MODULE_START ModuleName=»ManagedPipelineHandler», Notification=»END_REQUEST», fIsPostNotification=»true» 12:22:45.759
159. AspNetEndHandler 12:22:45.759
160. NOTIFY_MODULE_END ModuleName=»ManagedPipelineHandler», Notification=»END_REQUEST», fIsPostNotificationEvent=»true», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
161. NOTIFY_MODULE_START ModuleName=»HttpLoggingModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
162. NOTIFY_MODULE_END ModuleName=»HttpLoggingModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
163. NOTIFY_MODULE_START ModuleName=»IsapiModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
164. NOTIFY_MODULE_END ModuleName=»IsapiModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
165. NOTIFY_MODULE_START ModuleName=»DigestAuthenticationModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
166. NOTIFY_MODULE_END ModuleName=»DigestAuthenticationModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
167. NOTIFY_MODULE_START ModuleName=»WindowsAuthenticationModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
168. NOTIFY_MODULE_END ModuleName=»WindowsAuthenticationModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
169. NOTIFY_MODULE_START ModuleName=»BasicAuthenticationModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
170. NOTIFY_MODULE_END ModuleName=»BasicAuthenticationModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
171. NOTIFY_MODULE_START ModuleName=»ProtocolSupportModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
172. NOTIFY_MODULE_END ModuleName=»ProtocolSupportModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
173. NOTIFY_MODULE_START ModuleName=»IsapiFilterModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
174. NOTIFY_MODULE_END ModuleName=»IsapiFilterModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
175. NOTIFY_MODULE_START ModuleName=»DynamicCompressionModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
176. NOTIFY_MODULE_END ModuleName=»DynamicCompressionModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
177. NOTIFY_MODULE_START ModuleName=»HttpCacheModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
178. NOTIFY_MODULE_END ModuleName=»HttpCacheModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
179. NOTIFY_MODULE_START ModuleName=»CustomErrorModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
180. GENERAL_SEND_CUSTOM_ERROR HttpStatus=»500″, HttpSubStatus=»0″, FileNameOrURL=»500.htm» 12:22:45.759
181. FILE_CACHE_ACCESS_START FileName=»C:inetpubcusterren-US500.htm», UserName=»DefaultAppPool», DomainName=»IIS APPPOOL» 12:22:45.759
182. FILE_CACHE_ACCESS_END Successful=»true», FileFromCache=»true», FileAddedToCache=»false», FileDirmoned=»true», LastModCheckErrorIgnored=»true», ErrorCode=»The operation completed successfully. (0x0)», LastModifiedTime=»Thu,
05 Dec 2013 07:37:46 GMT»
12:22:45.759
183. NOTIFY_MODULE_END ModuleName=»CustomErrorModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
184. NOTIFY_MODULE_START ModuleName=»DynamicIpRestrictionModule», Notification=»SEND_RESPONSE», fIsPostNotification=»false» 12:22:45.759
185. NOTIFY_MODULE_END ModuleName=»DynamicIpRestrictionModule», Notification=»SEND_RESPONSE», fIsPostNotificationEvent=»false», NotificationStatus=»NOTIFICATION_CONTINUE» 12:22:45.759
186. HTTPSYS_CACHEABLE HttpsysCacheable=»false», Reason=»FILTER_CACHE_UNAWARE», CachePolicy=»NO_CACHE», TimeToLive=»0″ 12:22:45.759
187. GENERAL_FLUSH_RESPONSE_START 12:22:45.759
188. GENERAL_RESPONSE_HEADERS Headers=»Content-Type: text/html Server: Microsoft-IIS/8.0 X-AspNetMvc-Version: 4.0 X-Powered-By: ASP.NET « 12:22:45.759
189. GENERAL_RESPONSE_ENTITY_BUFFER Buffer=»<!DOCTYPE html PUBLIC «-//W3C//DTD XHTML 1.0 Strict//EN» «http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd»> <html xmlns=»http://www.w3.org/1999/xhtml»> <head> <meta http-equiv=»Content-Type»
content=»text/html; charset=iso-8859-1″/> <title>500 — Internal server error.</title> <style type=»text/css»> <!— body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;} h1{font-size:2.4em;margin:0;color:#FFF;} h2{font-size:1.7em;margin:0;color:#CC0000;} h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:»trebuchet
MS», Verdana, sans-serif;color:#FFF; background-color:#555555;} #content{margin:0 0 0 2%;} .content-container{background:#FFF;width:96%;margin-padding:10px;} —> </style> </head> <body> <div id=»header»><h1>Server
Error</h1></div> <div id=»content»> <div class=»content-container»><fieldset> <h2>500 — Internal server error.</h2> <h3>There is a problem with the resource you are looking for, and it cannot
be displayed.</h3> </fieldset></div> </div> </body> </html> «
12:22:45.759
190. GENERAL_FLUSH_RESPONSE_END BytesSent=»1406″, ErrorCode=»The operation completed successfully. (0x0)» 12:22:45.759
191. GENERAL_REQUEST_END BytesSent=»1406″, BytesReceived=»1153″, HttpStatus=»500″, HttpSubStatus=»0″ 12:22:45.759

I’m not that familiar with .Net application so please give me a kind answer. :)

During the course of my work i have observed that troubleshooting client certificate authentication seems bit challenging as there is not much tools to collect appropriate data for it. However i am correlating a list of check points which has always helped me.

When you have enabled client certificate authentication either using AD client certificate authentication or IIS client certificate mapping authentication you can follow the below steps in general.

The most common error or status code you would face with respect to client certificate authentication is 403.7 which means the server is expecting a client certificate but the client is not sending it.

Follow the steps in order to check what the issue might be

1) Make sure you have set Require for client certificate in SSL settings in IIS

2) When using IIS client certificate mapping we either use one to one mapping where we map individual certificate to an user or many to one mapping where we map all the certificates matching a criteria to a single user. The one to one mapping or the many to one mapping should be created at the site level. The most common mistake, I have seen is if people want to use client certificate authentication to a specific application under a site, they create the mappings at the application level which is wrong. You will have to create the mappings at the site level and enable client certificate authentication at the required level. The mappings will only be read at the site level and any mapping at the application level will be ignored. This is not mentioned in most of the internet articles.

3) On the client machine in IE make sure you go to Internet Options->Security->Intranet or Internet(Based on the type of site)->Miscellaneous->Don’t prompt for client certificate when only one certificate is disabled. We need to make sure it is disabled so that at least we get to know if we get a prompt for certificate selection and if this fails out after clicking on certificate or without even sending a certificate.

image

4) In the client machine, confirm that the client certificate has a private key. You can check this by going to mmc->Add or remove snapin->Certificates(My User Account)->Personal->Certificates and then select the client certificate which you have installed for authentication. If the certificate is proper then you should be able to see the private key as below. ALso you can run the below command to check the validity of the certificate

certutil –verifystore my <Thumbprint of the certificate>

image

5)  Also go to details tab of the certificate and click on Enhanced Key usage where you should see that this certificate is intended for client certificate authentication which also validates the certificate to be a genuine client certificate.

image

6) If you go to the Certification Path tab in the certificate, you will be able to see the certificate chain. Double Click on each certificate in the chain and make a note of it.

image

7) In the certification path the certificate at the top is called the Root Certificate and the certificates in between the Root CA and the actual certificate in the chain are called Intermediate CA’s. In the above image there is a single intermediary CA but there can be more than one intermediary CA as well. In the server machine and as well as the client machine go to mmc->Add or Remove Snapin->Certificates Local Computer->Trusted Root Certification Authorities->Certificates, make sure the Root CA is present in this location. Next go to Intermediate Certification Authorities->Certificates and make sure the Intermediate CA’s are present there. This step is important because during SSL handshake when the server requests for the client certificate it sends the list of Trusted Issuer List which will contain the list of the Trusted Root CA’s installed on the server to the client and based on the that the client certificate to be sent is chosen.

Note: By default as mentioned above the Trusted issuer list is sent along with the certificate request during SSL handshake but this behaviour changed from windows 2012 or IIS 8 and onwards. In IIS 8 and onwards by default we don’t send any Trusted Issuer list. If we don’t send any Trusted Issuer List then the client has the freedom of selecting any client certificate in its store.

8) The feature of sending the CTL or trusted list can also be controlled by setting the below registry key which can be used from windows 2008 and onwards. If the value is set to 1 then the list is send and if the value is 0 then the list will not be sent. In windows 2012 and onwards the default value is 0 and in the lower versions the default value is 1 if the key is not present.

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNEL

Value name: SendTrustedIssuerList
Value type: REG_DWORD
Value data: 0 (False) or 1(True)

9) There is one more thing you need to cross check if this is a windows 2012 (IIS 8) and higher machine. By default the CTL is off, if the CTL is on and if in the server mmc->Add or Remove Snapin->Certificates Local Computer->Trusted Root Certification Authorities->Certificates you have a non-self signed certificate then you might receive a 403.7 error as well. More details on the issue is logged in the below kb. The solution is to delete the non-self signed certificate from the Trusted Root Certification Authority

https://support.microsoft.com/en-in/kb/2802568

Note: A self-signed certificate is a certificate where the issuer and issued to fields will be same. A root certificate authority will always have a self signed certificate and hence if there are non-self signed certificates in the Trusted Root Certificate Store then that certificate is not a valid Root CA.

10) Thanks to Daniel Stolt, i had missed out a point. If the client is a web application or a web service and you are sending the client certificate from the code then the additional thing you will have to check is if the identity of the client application has permissions on the machine key for the client certificate. There are 2 ways you can do it.

Method A: Go to mmc->Add or Remove Snapin->Certificates Local Computer or Current User->Personal->Certificates. Right Click on the correct client certificate->Manage Private Keys and give permissions to the identity or user under which the client application is running.

image

Method B: This is bit complicated but interesting method. In this method we find out the machine key linked with the client certificate and then give the proper permissions required.

a. Download and install «find private key» application
http://blog.rhysgoodwin.com/windows-admin/findprivatekey-exe-pre-compiled/

b.  Find the Thumbprint of the client certificate
Run -> MMC -> File-> ADD or REMOVE SNAP IN->certificates-> Local Computer or Current User->Ok
Expand Personal->Certificates->Choose the appropriate certificate and open it
In the certificate->details tab->Thumbprint->Copy it

c. find the private key path for the certificate suing the thumbprint copied
Syntax:
FindprivateKey.exe My LocalMachine -t «THumbprint of the certificate»

Example:
FindprivateKey.exe trustedPeople LocalMachine -t «46 96 43 58 73 0b e9 4c 89 6f 5b ee fb c2 d7 08 03 6e 28 0b»
C:Temp>FindprivateKey.exe My LocalMachine -t «46 96 43 58 73 0b e9 4c 89 6f 5b ee fb c2 d7 08 03 6e 28 0b»
Private key directory:
C:ProgramDataMicrosoftCryptoRSAMachineKeys
Private key file name:
7a1fb2a3cb309c7af2d6fe47e8394f24_032abc89-fbae-4ac1-aab5-6c22351edcee

d. Next, we need to provide permissions to application pool account to certificate

syntax (account to use : app pool identity — in our case it is NetworkService):
icacls «private key file path» /grant «Account»:R

example:
icacls C:ProgramDataMicrosoftCryptoRSAMachineKeys7a1fb2a3cb309c7af2d6fe47e8394f24_032abc89-fbae-4ac1-aab5-6c22351edcee /grant «NT AUTHORITYNetworkService»:R

11) Also several times i have seen that 403.7 is just masking the actual error. On the client you get a 403.7 but there might be a different error before that. For this please check the logs. One common scenario i have seen is as below. We see a 500 just before the 403.7 error and this is visible in logs as below

2015-09-06 15:46:29 W3SVC1 — GET / – 443 – 10.10.10.100 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.1;+WOW64;+Trident/6.0) – — chiranth.com 500 0 64 0

If we take Failed request traces for the 500 we see below

MODULE_SET_RESPONSE_ERROR_STATUS
Warning ModuleName=»IIS Web Core», Notification=»BEGIN_REQUEST», HttpStatus=»500″, HttpReason=»Internal Server Error», HttpSubStatus=»0″, ErrorCode=»The I/O operation has been aborted because of either a thread exit or an application request.
(0x800703e3)», ConfigExceptionInfo=»» 

In this scenario normally you would have got a prompt for the certificate in IE but you end you getting 403.7 still in the end because the certificate was not read completely. Normally when we just set certificate to Require in SSL settings, the client certificate negotiation happens in later part of the request. To avoid the above error we have to enable clientcertificatenegotiation so that the negotiation happens during ssl handshake during the server hello is sent. To enable client cert negotiation you can follow the below blog

http://blogs.iis.net/rickbarber/require-client-certificates-in-iis-7-5

The blog talks on how to enable by deleting and recreating the bindings from command prompt. There is also a hack which we can follow as below.

For example if you have a SSL binding for IP: PORT 10.10.10.10:443 then traverse to the registry path HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesHTTPParametersSslBindingInfo10.10.10.10:443

Create a DWORD called DefaultFlags and set the value to 2. The commands mentioned in the blog also does the same

The above changes require a machine reboot to take effect.

12) The above steps sums up the configuration part from the client and server perspective. But i have seen 403.7 error pop because of network issues as well. I have seen the issue happen If there is some intermediary device or firewall or proxy which doesn’t support client certificate authentication or negotiation. If we have set clientcertificatenegotitation as above then we will be able to see the client certificate request in the earlier stage of the handshake itself as below

image

if we don’t have clientcertificatenegotiation then we might not be able to see the certificate request(Server Hello) in the handshake as it might happen later and it will be encrypted.

If you have the setting enabled and you still don’t see the client certificate request and see something like below then this is a possible issue with a network device

image

As one more final step you can also try enabling SCHANNEL logging. Steps are in the below link

https://blogs.msdn.microsoft.com/chiranth/2014/02/18/ssl-troubleshooting-troubleshooting-steps-for-s…

Hope this helps Smile

Author: Chiranth Ramaswamy

HttpStatus=»500″, HttpReason=»Internal Server Error», HttpSubStatus=»0″, ErrorCode=»The filename, directory name, or volume label syntax is incorrect. (0x8007007b)», ConfigExceptionInfo=»»

Does anyone have any idea where I can go to correct the apparent flaw in the path? I have checked the web.config file and several other configuration files but can’t find where this path is being picked up. I am fairly certain that I can resolve the problem if I can target the source unless it is actually being generated within another dll.

I am running Windows Vista Ultimate with SP1, .NET 3.5 and IIS 7.0.

I’ve tried ASPNET forums but I figured since this is an SSRS app that this forum may be more appropriate for the post.

Any assistance or advice toward resolving this problem would be greatly appreciated.

Источник

Troubleshoot IIS7 errors like a pro

So you just moved your application to an IIS7 server, and now you are getting an error when you make a request to it. This seems to be a popular theme on IIS.NET forums these days, and after answering a hundred or so of these posts, I figured I should do something to help people track down and fix their issues with a little less frustration.

It can be very hard to link generic IIS errors to underlying issues that you can fix. Head over to LeanSentry to get a comprehensive application checkup. We’ll find your actual IIS and ASP.NET issues, and even show you how to fix them in code.

Server software, and web servers specifically, are very complex and highly configurable systems that support multi-tier applications using a variety of technologies and subsystems, and endure further complexity due to security, performance, and reliability demands, so it’s a wonder it all works as well as it does in the end. IIS7 strives to improve the experience of diagnosing and solving problems when they do occur, so knowing how to use the new IIS7 diagnostics features can come a long way in helping you become a pro at troubleshooting server problems.

First things first – what’s the problem?

I often find myself asking this question on the forums when someone posts something like “Help, I moved to IIS7 and now my application doesn’t work!”. Huh, what doesnt work? When your site stops working, the first thing you need to do is determine what the error actually is before we can move any further. IIS7 has much better error messages that will often tell you exactly what the problem is, and help you fix it.

Unfortunately, sometimes getting to this error is the main challenge. Let’s look at a few things you may need to do to get there:

1) Disable IE “Friendly HTTP error messages”
IE will by default replace the actual error messages coming from the server with a “friendly” error message, which hides the error contents we need to see. For example, for a 404 Not Found error, you may instead see the following:

To disable this and see the real error coming from the server, you need to go to “Tools > Internet Options”, choose the Advanced tab, and clear the “Show friendly HTTP error messages” checkbox. Then, close the browser, open it again, and re-request the page.

Now, suppose you are still seeing the generic “cannot display the webpage” or “page not found” error. This is typically caused by IE failing to connect to your website, so there is no server error message to look at here. I have a detailed guide to troubleshooting this condition here: Where did my IIS7 server go? Troubleshooting “server not found” errors .

An aside : If you don’t want to mess with IE for troubleshooting (especially if you suspect you are getting cached pages, due to IE’s super- aggressive caching), the best thing to do is break out a trusty simple http tool of choice and make the request with it. I recommend WFETCH, which is included in the IIS6 Resource Kit tools (you can install on XP/Windows 2003 only, and can either run it from there or copy wfetch.exe to your Vista/LHS box).

2) Enable IIS7 detailed errors
IIS7 introduces a new custom errors feature, which by default hides the error responses issued by the server to remote clients, replacing them with a basic error message. This is critical for security of your site, as errors frequently contain sensitive information that you don’t want others to see, but makes getting to the bottom of the problem harder since you cannot see those very error details. So, if you are requesting your site from another machine, you may still get a basic error that looks like this:

You have two options here:

1) Make the request locally from the server machine
.
By default, you will get the detailed error.

2) Enable detailed errors for remote clients.
First, if your error is an ASP.NET exception (you can tell if it says “Runtime Error” and has the framework version), please be aware that ASP.NET overrides the IIS custom error mechanism with its own implementation of custom errors, so you should turn the ASP.NET custom errors off to see detailed ASP.NET exceptions. You DO NOT have to configure IIS7 custom errors for ASP.NET exceptions (it would be silly to have to do it in two places). To turn off ASP.NET custom errors, place the following in your web.config:

If the error is not an ASP.NET error, turning off IIS7 custom errors will allow error responses from your application to be sent to remote clients without being censored by the IIS7’s custom errors module.

You can do this from the IIS7 Admin tool by running “Start>Run>inetmgr.exe”, selecting your website/application/virtual directory in the left-hand tree view, clicking on the “Error Pages” icon, clicking “Edit Feature Settings” action, and then selecting “Detailed Errors”.

You can alternatively do this from an elevated command line prompt (Run as Administrator):

> %windir%system32inetsrvappcmd.exe set config “Default Web Site/yourapp” /section:httpErrors /errorMode:Detailed

Where “Default Web Site” should be replaced with your site’s name if different, and “/yourapp” with the virtual path you’d like to enable detailed errors for.

NOTE: When you are done debugging, please return the settings back to custom errors for remote requests, or the security of your website may be compromised. Here is how to do it with AppCmd:

> %windir%system32inetsrvappcmd.exe set config “Default Web Site/yourapp” /section:httpErrors /errorMode:DetailedLocalOnly

Now, you should be getting detailed errors back – for example, the error I was getting before now looks like this (this is the Vista error page – Longhorn Server and Vista SP1 error pages will look much nicer, see this for an example ):

Notice that this error contains quite a bit of useful information:
1) The heading contains the substatus code, 404.0, which is an IIS specific code that further describes the problem. The majority of common errors has a unique . combination that you can easily google for additional information.
2) The page indicates what module (IIS Web Core), and in what notification (MapRequestHandler) an error occurred. This information is critical whenever you are debugging server problems, especially on the IIS7+ world when most of them occur in one of the modules that take part in the processing of the request.
3) The page shows you some useful request information, such as the requested url and the physical path to which it resolved. Most 404 errors will be resolved right here, by seeing that the request is being made to a wrong url or resolving to a wrong physical path due to incorrect virtual directory mapping.
4) The “most likely causes” and “what you can try” sections offer the most likely explanation for the error and what you can do about it. They are dead on for the majority of common IIS7 errors.

NOTE: When you are coming to the forums with an error, we expect you to have gotten this far and that you will provide the detailed error to help us with your problem. For more information about the custom errors support in IIS7, check out http://www.iis.net/articles/view.aspx/IIS7/Managing-IIS7/Diagnostics-in-IIS7/Deciphering-Error-Messages/How-to-Use-HTTP-Detailed-Errors-in-IIS7 .

3) Detour – the 503 “Service Unavailable” error
Sometimes, you will get an error that looks like this:

This error most likely either indicates a critical misconfiguration of the server that is causing IIS to fail to start a worker process/process your request, or a system overload condition that is causing requests to be rejected early, so no further error information will be available in the response. If you are getting this error, please follow my detailed guide: Where did my IIS7 server go? Troubleshooting “service unavailable” errors .

Deeper diagnostics with Failed Request Tracing (formerly known as FREB)

If the error alone is not sufficient to diagnose the condition, or more information is needed to determine what lead up to the error occurring, or, there is no error (for example, request times out), you can take advantage of the wonderful IIS7 feature called “Failed Request Tracing”.

This feature can be used to generate a detailed trace of events leading up to the failure, much like ETW, but now with more/more useful events and significantly easier to turn on and use for troubleshooting.

More importantly, you can configure Failed Request Tracing to only trace requests that encounter a specific failure condition, such as a specific response status/substatus codes, an event of specific verbosity, or a timeout.

To do this, you are going to need to install it first (if you haven’t already):
On Vista : Control Panel, Programs, Turn Windows Features on or off, check Internet Information ServicesWorld Wide Web ServicesHealth and DiagnosticsTracing.
On Windows Server 2008 : Start>Run>Server Manager, Roles, Web Server(IIS), Add Role Services, check Web ServerHealth and DiagnosticsTracing

Then, to enable IIS to generate these logs, you need to do two things:
1) Enable Failed Request Tracing for the site you want to trace

In InetMgr, select your site in the left-hand tree view, then under Actions on the right click “Failed Request Tracing …”. There, select the Enable box.

2) Create a Failed Request Tracing rule with the events and failure definition of choice

In InetMgr, select the site/application/virtual directory that you’d like to trace in the tree view, click the “Failed Request Tracing Rules” icon, click the “Add…” action, and follow the wizard to create the rule.

You will be asked what content you’d like to trace (based on an extension), when to consider the request as failed (a list of response status codes, and in Longhorn Server, also event verbosity) or a timeout, and finally the events you’d like to trace. I recommend to leave all events selected by default, unless you are sure you know what you are looking for.

Now, when you make a request, if it meets the failure definition, the detailed trace will be logged as an XML file that you can inspect (or send to us for inspection).

You can by default find this file in %systemdrive%inetpublogsFailedReqLogFilesW3SVC folder.

If you double-click this file, it will open with the provided XSL stylesheet that shows the trace events. In Longhorn Server, this stylesheet has gotten a major overhaul to highlight the important information better – for more information, see this: http://blogs.iis.net/bills/archive/2006/10/19/Making-Failed-Request-Tracing-More-Approachable.aspx . You can download the new stylesheet and use it today for your Vista machine.

The Failed Request Tracing log provides verbose execution information for the request, that can be used in a number of ways to further diagnose more complex problems that may result from the operation of more than one module. For example, if a url rewriter module changes a url in the request, which later leads to the static file handler failing to find the file, the SetUrl event can provide the needed information. The log also provides such key info as the times taken by each module to execute, the outcome of each of the built-in module’s operation (often including the reason why something didn’t work), and any times when a module fails a request by setting an error response status code.

Finally, one of the main strengths of Failed Request Tracing is that you do not have to be the client to receive the error information. As an administrator, you can configure it to monitor for errors and log the forensic trace when they occur, allowing you to just leave the feature on in production. Think of it as request logs on steroids. To learn more about Failed Request Tracing, see http://www.iis.net/articles/view.aspx/IIS7/Managing-IIS7/Diagnostics-in-IIS7/Using-Failed-Request-Tracing/Troubleshooting-Failed-Requests-using-Tracing-in-I .

I will post more specific strategies on how to troubleshoot with Failed Request Tracing logs in a future post. In the meantime, you should now be a lot more prepared to deal with errors when they occur, and resolve them before you type that first forum post. And if you do make a post (which you are welcome to do), you’ll be able to provide us with the key information to help you solve your problem.

Источник

Adblock
detector

So you just moved your application to an IIS7 server, and now you are getting an error when you make a request to it.  This seems to be a popular theme on IIS.NET forums these days, and after answering a hundred or so of these posts, I figured I should do something to help people track down and fix their issues with a little less frustration. 

Dealing with 500, 503 IIS errors? These are likely hiding bigger application issues that are hurting your application.   

It can be very hard to link generic IIS errors to underlying issues that you can fix. Head over to LeanSentry to get a comprehensive application checkup. We’ll find your actual IIS and ASP.NET issues, and even show you how to fix them in code.

Server software, and web servers specifically, are very complex and highly configurable systems that support multi-tier applications using a variety of technologies and subsystems, and endure further complexity due to security, performance, and reliability demands, so it’s a wonder it all works as well as it does in the end.  IIS7 strives to improve the experience of diagnosing and solving problems when they do occur, so knowing how to use the new IIS7 diagnostics features can come a long way in helping you become a pro at troubleshooting server problems.

First things first – what’s the problem?

I often find myself asking this question on the forums when someone posts something like “Help, I moved to IIS7 and now my application doesn’t work!”.  Huh, what doesnt work? When your site stops working, the first thing you need to do is determine what the error actually is before we can move any further.  IIS7 has much better error messages that will often tell you exactly what the problem is, and help you fix it.

Unfortunately, sometimes getting to this error is the main challenge.  Let’s look at a few things you may need to do to get there:

1) Disable IE “Friendly HTTP error messages”
IE will by default replace the actual error messages coming from the server with a “friendly” error message, which hides the error contents we need to see.  For example, for a 404 Not Found error, you may instead see the following:

IE Friendly Error

 To disable this and see the real error coming from the server, you need to go to “Tools > Internet Options”, choose the Advanced tab, and clear the “Show friendly HTTP error messages” checkbox.  Then, close the browser, open it again, and re-request the page.

Disable IE friendly HTTP error messages

Now, suppose you are still seeing the generic “cannot display the webpage” or “page not found” error.   This is typically caused by IE failing to connect to your website, so there is no server error message to look at here.  I have a detailed guide to troubleshooting this condition here: Where did my IIS7 server go? Troubleshooting “server not found” errors.

An aside: If you don’t want to mess with IE for troubleshooting (especially if you suspect you are getting cached pages, due to IE’s super- aggressive caching), the best thing to do is break out a trusty simple http tool of choice and make the request with it.  I recommend WFETCH, which is included in the IIS6 Resource Kit tools (you can install on XP/Windows 2003 only, and can either run it from there or copy wfetch.exe to your Vista/LHS box).

2) Enable IIS7 detailed errors
IIS7 introduces a new custom errors feature, which by default hides the error responses issued by the server to remote clients, replacing them with a basic error message.  This is critical for security of your site, as errors frequently contain sensitive information that you don’t want others to see, but makes getting to the bottom of the problem harder since you cannot see those very error details. So, if you are requesting your site from another machine, you may still get a basic error that looks like this:

IIS7 custom error page

You have two options here:

1) Make the request locally from the server machine

By default, you will get the detailed error.

2) Enable detailed errors for remote clients.  
First, if your error is an ASP.NET exception (you can tell if it says “Runtime Error” and has the framework version), please be aware that ASP.NET overrides the IIS custom error mechanism with its own implementation of custom errors, so you should turn the ASP.NET custom errors off to see detailed ASP.NET exceptions.  You DO NOT have to configure IIS7 custom errors for ASP.NET exceptions (it would be silly to have to do it in two places).  To turn off ASP.NET custom errors, place the following in your web.config:

<system.web>
   <customErrors mode=”Off” />
</system.web>

If the error is not an ASP.NET error, turning off IIS7 custom errors will allow error responses from your application to be sent to remote clients without being censored by the IIS7’s custom errors module.

You can do this from the IIS7 Admin tool by running “Start>Run>inetmgr.exe”, selecting your website/application/virtual directory in the left-hand tree view, clicking on the “Error Pages” icon, clicking “Edit Feature Settings” action, and then selecting “Detailed Errors”.

Enable IIS7 Detailed Errors

You can alternatively do this from an elevated command line prompt (Run as Administrator):

> %windir%system32inetsrvappcmd.exe set config “Default Web Site/yourapp” /section:httpErrors /errorMode:Detailed

Where “Default Web Site” should be replaced with your site’s name if different, and “/yourapp” with the virtual path you’d like to enable detailed errors for.

NOTE: When you are done debugging, please return the settings back to custom errors for remote requests, or the security of your website may be compromised.  Here is how to do it with AppCmd:

> %windir%system32inetsrvappcmd.exe set config “Default Web Site/yourapp” /section:httpErrors /errorMode:DetailedLocalOnly

 
Now, you should be getting detailed errors back – for example, the error I was getting before now looks like this (this is the Vista error page – Longhorn Server and Vista SP1 error pages will look much nicer, see this for an example):

IIS7 Detailed Error Page

Notice that this error contains quite a bit of useful information:
1) The heading contains the substatus code, 404.0, which is an IIS specific code that further describes the problem.  The majority of common errors has a unique <status_code>.<substatus_code> combination that you can easily google for additional information.
2) The page indicates what module (IIS Web Core), and in what notification (MapRequestHandler) an error occurred.  This information is critical whenever you are debugging server problems, especially on the IIS7+ world when most of them occur in one of the modules that take part in the processing of the request.
3) The page shows you some useful request information, such as the requested url and the physical path to which it resolved.  Most 404 errors will be resolved right here, by seeing that the request is being made to a wrong url or resolving to a wrong physical path due to incorrect virtual directory mapping.
4) The “most likely causes” and “what you can try” sections offer the most likely explanation for the error and what you can do about it.  They are dead on for the majority of common IIS7 errors.

NOTE: When you are coming to the forums with an error, we expect you to have gotten this far and that you will provide the detailed error to help us with your problem.  For more information about the custom errors support in IIS7, check out http://www.iis.net/articles/view.aspx/IIS7/Managing-IIS7/Diagnostics-in-IIS7/Deciphering-Error-Messages/How-to-Use-HTTP-Detailed-Errors-in-IIS7.

3) Detour – the 503 “Service Unavailable” error
Sometimes, you will get an error that looks like this:

503 Service Unavailable

This error most likely either indicates a critical misconfiguration of the server that is causing IIS to fail to start a worker process/process your request, or a system overload condition that is causing requests to be rejected early, so no further error information will be available in the response.  If you are getting this error, please follow my detailed guide: Where did my IIS7 server go? Troubleshooting “service unavailable” errors.

Deeper diagnostics with Failed Request Tracing (formerly known as FREB)

If the error alone is not sufficient to diagnose the condition, or more information is needed to determine what lead up to the error occurring, or, there is no error (for example, request times out), you can take advantage of the wonderful IIS7 feature called “Failed Request Tracing”.

This feature can be used to generate a detailed trace of events leading up to the failure, much like ETW, but now with more/more useful events and significantly easier to turn on and use for troubleshooting.

More importantly, you can configure Failed Request Tracing to only trace requests that encounter a specific failure condition, such as a specific response status/substatus codes, an event of specific verbosity, or a timeout.

To do this, you are going to need to install it first (if you haven’t already):
On Vista: Control Panel, Programs, Turn Windows Features on or off, check Internet Information ServicesWorld Wide Web ServicesHealth and DiagnosticsTracing.
On Windows Server 2008: Start>Run>Server Manager, Roles, Web Server(IIS),  Add Role Services, check Web ServerHealth and DiagnosticsTracing

Then, to enable IIS to generate these logs, you need to do two things:
1) Enable Failed Request Tracing for the site you want to trace

In InetMgr, select your site in the left-hand tree view, then under Actions on the right click “Failed Request Tracing …”.  There, select the Enable box.

Enable Failed Request Tracing for a site

2) Create a Failed Request Tracing rule with the events and failure definition of choice

In InetMgr, select the site/application/virtual directory that you’d like to trace in the tree view, click the “Failed Request Tracing Rules” icon, click the “Add…” action, and follow the wizard to create the rule.

You will be asked what content you’d like to trace (based on an extension), when to consider the request as failed (a list of response status codes, and in Longhorn Server, also event verbosity) or a timeout, and finally the events you’d like to trace.  I recommend to leave all events selected by default, unless you are sure you know what you are looking for.

Create a Failed Request Tracing rule

Now, when you make a request, if it meets the failure definition, the detailed trace will be logged as an XML file that you can inspect (or send to us for inspection). 

You can by default find this file in %systemdrive%inetpublogsFailedReqLogFilesW3SVC<ID> folder. 

If you double-click this file, it will open with the provided XSL stylesheet that shows the trace events.  In Longhorn Server, this stylesheet has gotten a major overhaul to highlight the important information better – for more information, see this: http://blogs.iis.net/bills/archive/2006/10/19/Making-Failed-Request-Tracing-More-Approachable.aspx.  You can download the new stylesheet and use it today for your Vista machine.

The Failed Request Tracing log provides verbose execution information for the request, that can be used in a number of ways to further diagnose more complex problems that may result from the operation of more than one module.  For example, if a url rewriter module changes a url in the request, which later leads to the static file handler failing to find the file, the SetUrl event can provide the needed information.  The log also provides such key info as the times taken by each module to execute, the outcome of each of the built-in module’s operation (often including the reason why something didn’t work), and any times when a module fails a request by setting an error response status code.

Finally, one of the main strengths of Failed Request Tracing is that you do not have to be the client to receive the error information.  As an administrator, you can configure it to monitor for errors and log the forensic trace when they occur, allowing you to just leave the feature on in production.  Think of it as request logs on steroids.  To learn more about Failed Request Tracing, see http://www.iis.net/articles/view.aspx/IIS7/Managing-IIS7/Diagnostics-in-IIS7/Using-Failed-Request-Tracing/Troubleshooting-Failed-Requests-using-Tracing-in-I.

I will post more specific strategies on how to troubleshoot with Failed Request Tracing logs in a future post.  In the meantime, you should now be a lot more prepared to deal with errors when they occur, and resolve them before you type that first forum post.  And if you do make a post (which you are welcome to do), you’ll be able to provide us with the key information to help you solve your problem.

Thanks,

Mike

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account


Closed

andre-ss6 opened this issue

Sep 6, 2018

· 27 comments

Comments

@andre-ss6

Our web app started returning seemingly random 400s since the last two weeks. It is a ASP.NET Core 2.0 mvc web site running under IIS and Windows Server 2016. First thing we did was, of course, look at our logs. However, there was nothing. None of those 400s were there. We then enabled Failed Request Tracing and found this: https://pastebin.com/NVR2pzbJ (as you may know, Failed Request Traces from IIS are quite gigantic, thus I’m using pastebin). Anyway, the TLDR is this:

<EventData>
  <Data Name="ContextId">{80002F02-0002-EE00-B63F-84710C7967BB}</Data>
  <Data Name="ModuleName">AspNetCoreModule</Data>
  <Data Name="Notification">128</Data>
  <Data Name="HttpStatus">400</Data>ç
  <Data Name="HttpReason">Bad Request</Data>
  <Data Name="HttpSubStatus">0</Data>
  <Data Name="ErrorCode">0</Data>
  <Data Name="ConfigExceptionInfo"></Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>MODULE_SET_RESPONSE_ERROR_STATUS</Opcode>
  <Keywords>
   <Keyword>RequestNotifications</Keyword>
  </Keywords>
  <freb:Description Data="Notification">EXECUTE_REQUEST_HANDLER</freb:Description>
  <freb:Description Data="ErrorCode">The operation completed successfully.
 (0x0)</freb:Description>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{002E91E3-E7AE-44AB-8E07-99230FFA6ADE}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>4</Level>
  <Opcode>56</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2018-09-06T13:58:08.103Z"/>
  <Correlation ActivityID="{80002F02-0002-EE00-B63F-84710C7967BB}"/>
  <Execution ProcessID="3828" ThreadID="14428"/>
  <Computer>siip</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{80002F02-0002-EE00-B63F-84710C7967BB}</Data>
  <Data Name="HeaderName">Content-Length</Data>
  <Data Name="HeaderValue">0</Data>
  <Data Name="Replace">true</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>GENERAL_SET_RESPONSE_HEADER</Opcode>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>4</Level>
  <Opcode>56</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2018-09-06T13:58:08.103Z"/>
  <Correlation ActivityID="{80002F02-0002-EE00-B63F-84710C7967BB}"/>
  <Execution ProcessID="3828" ThreadID="14428"/>
  <Computer>siip</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{80002F02-0002-EE00-B63F-84710C7967BB}</Data>
  <Data Name="HeaderName">Server</Data>
  <Data Name="HeaderValue">Kestrel</Data>
  <Data Name="Replace">true</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>GENERAL_SET_RESPONSE_HEADER</Opcode>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>5</Level>
  <Opcode>3</Opcode>
  <Keywords>0x100</Keywords>
  <TimeCreated SystemTime="2018-09-06T13:58:08.103Z"/>
  <Correlation ActivityID="{80002F02-0002-EE00-B63F-84710C7967BB}"/>
  <Execution ProcessID="3828" ThreadID="14428"/>
  <Computer>siip</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{80002F02-0002-EE00-B63F-84710C7967BB}</Data>
  <Data Name="ModuleName">AspNetCoreModule</Data>
  <Data Name="Notification">128</Data>
  <Data Name="fIsPostNotificationEvent">false</Data>
  <Data Name="CompletionBytes">0</Data>
  <Data Name="ErrorCode">0</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>NOTIFY_MODULE_COMPLETION</Opcode>
  <Keywords>
   <Keyword>RequestNotifications</Keyword>
  </Keywords>
  <freb:Description Data="Notification">EXECUTE_REQUEST_HANDLER</freb:Description>
  <freb:Description Data="ErrorCode">The operation completed successfully.
 (0x0)</freb:Description>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{002E91E3-E7AE-44AB-8E07-99230FFA6ADE}</EventGuid>
 </ExtendedTracingInfo>
</Event>

Now, I’m not an IIS expert by any means, but if I understand this correctly, Asp.Net Core has run and has decided to return 400 bad request. The problem is: our code never ran. This is our Startup.Configure():

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            // This middleware, as you can see, is the first thing ever to run and it simply logs
           // everything that enters and leaves. Do note that other "normal" 400 errors are logged by this
            app.UseMiddleware<SerilogMiddleware>();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseBrowserLink();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error/500");
            }

            // other middleware ...

            // This turns 400s, 404s and 500s into some pretty pages.
            // And this middleware is also not being run when this problem occurs,
            // further evidencing that Kestrel is returning 400 _before_ any of my code runs.
            app.UseStatusCodePagesWithReExecute("/Home/Error/{0}");

            app.UseMvc(routes =>
            {
                routes
                .MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });
        }

We thought that maybe the request got corrupted and somehow it was so invalid that kestrel didn’t even bother to send it to the rest of the pipeline. However, we’ve repated the same request on fiddler and they return success codes. This is the request if you don’t want to navigate through those 4k lines of log:

Cache-Control: max-age=0
Connection: keep-alive
Content-Length: 2410
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: .AspNetCore.Antiforgery.yRvNsY19ltY=CfDJ8DgfkYSRB59EqqhuWGHNsd9RwNppJLY8SuEzNMhyyszJv8tPzAJPfuZ4uwMX8RPtO28x3qVO1FtSXHGrb4pjZLkETcbVr4zDiH4VEuoFYbNqBe6hUKHZrN4Vg_5LIGCfY6vVLtnX1Dl7QCy3arKjRVY; .AspNetCore.Cookies=CfDJ8DgfkYSRB59EqqhuWGHNsd_qCE-_zqZcbhiSe47BlGFvLNyIFQ2CyUTMFARZScdH8o0E-LhqGzGgbMPnn5G9-T0KpL7sV0K4uQ1yYA59vo25d42-rtr8WMz2jgEVlYCwiUoZwy0AHBhJstwdilM3_D3FxkJTzebye8BHOrjobdeOqTWk4D774_V4M-O2-pltX3On_U0vKheQGc2-YrGwP4RFlR0x9XSrszgtKyRv_mJE67g9ueRD1aRRp9-BGoymJujrxjDnuPD7ZIN1RWlstiV5RyQpsjnurMISgNsl6ET5wRH0-Bu2p-RNnjAiFHAlCjom4RKb7pKDXMipaQoEGkwesn4T02kV5R4NhwrUOzbyUFZ1aWltOFuDp6Ce3pMAnPNtx2SsUN0ru7T3Yjc1pUIEZW3_quxcHQnrb601NGRHZpmoIqVOJSIFOhuX-rgYhGWfBUHtqckv2Cb-WiS1sIrR0Za7E692mQkVvbN5uT1n1fFbhNLRmixT0empfGtI8ZrKbHDjmVhdOuTvgNRZ3Z0uQx05pjmtITHenYkqCtPja0j-sCqEIhMsfXc2XFj4dNNvTMWEBGHXzTpvqD2CUgpBt2fHxC2fm8tRXZPWgojqVrM4JRMS03sl5nf92RIbtubVc8gsRNYIZPftLdl193PmosGSAYhpiU6XyRwh7d4KILEgsXJPZXiwY5UTmBCqW84aHRv9X9ZZ1P-e9jvBHm_31gR8IbiFeiZqGTRF8_cPDYuBd43fuA0z_L1G8LpcNaQrbDm-CrVuaWLpr8aQy-VzrQJMiCJWUxo9sQRZGCaK_Jl_ukRKn-YHelY9nNAAcWitiPLdqQYal194oLYPYo4t7K9ftGQuib4NJa7I8TwXeKK1Qy6TVupTQgUNIjO_yvRiZyrnvq5oaOP9V9SYT4_nppOhryaqVQ-jJRY4XKxqnP5shwDbPtOVFg-67ozWebX_a7EHSzULIvSoBUsR7utlhZCmmBJGgBZZhJfr2-6GWwcdcJ23Sz0x5JyW-O4Liw4ErXnbEdSvZTomjS2pjqleG_TsBJS6xCEIStSRRiyxZduG9ihmQB1fCGC8DhTmckU0-M_quPsHGjBahr7f1MNx6yXxF5ms4CHSvG-i7Lhh-WDDRLg21dBvtFrvT65bYsoRPHsukfi-6dT3oS49KdriqCNKTa5o4nWX98563be0znJTj8T_1eXOrYcjRfYThZnkB8OpJjz1Eihaj7bgQ-N6zuK3NWJSU3j4EA2s15qgrnVzCEXcd37HpQxRzTtCJ0eS-EY062xf3RW441WRY1-bhqjsAgajW6JCgkh7Ukb4W-_accuiUjW0U2jSepyUysdTva64JwF8hKF7ap1StomK1U7Dxg10hLJ3vMfqW1G5Tbo-ahQCVhBxhgKjsCFUFALdQUlWgnfsXMyr-6wbT273lQ7xsYW2HzhkSLYyWbkZLXEP5QJjm4hgb8EEEJYrLLkwqAyu5uO7CLqbLbKlytAH5rAcvnWq6J2yZfC_diNoRW35gaw96RV51OTI2CQTOPzYzqZTfUYmkhuNeGkNIZqgPOKJivZu5aSNMBBrzqXPcDAPmHEOKTlNODtiN1f3sE1XzPUz2CWRf-GMTO6NwdrRYgx2Y6aTf_XCElC5z6Rk1dK04yhR9xBKq_l35YjyuZNPg9ArO46jhfBM1WbaB_tmBPob9dSEuW5kXNnfBZ-CbWJZEioequiVC-_Z2PGtbOeRkFtCfPgk07t9kVskNjYHtFRSmEB7kmC-DYDFz29SXicjsgTko05tmviT_XxTDaAtdQfoYap5QF8BTgSW9L2uvDPB3XS5QUhiKSbXtU-UUoQp4uJ_zGwg3H-2bsTiieG2ZfGZ7uRKGQ1we-WWp1Jb-4ADv28ZQrQuYaNfRtelIxixDmUWoOoygIvGV_K-Ini27CPeZ8ys5oG3LiW-sQND_eVIluCGwY3RkorPhgmggAKOsHIvqRyzD3Y0PtdUkqN2J5cODm4sADZl9J_0uFhe4q-dnCyeqQhDbKfIr3nCiHehKfsBKKa_49aOF0ZhH9z5quZvymtWo3mAJp3VUNTdJcAqYnvWWydS3gLhlGz2AJxkpnzVd0XDaTy4y3yDoS_h15efbjZjI6hrByCAg48phLByXJ0aJYKeh-7Qf-lsvVpixkQKOWie5weN8LWKbE5z8HdKVW0gL_2me7fh1k8PdI3wyX6dvG1K6Ez0GN2nWl0wNUQknyj9xCAr2IOzmNXXJkDHzLBxtvIJvUqRQTN5MRwmz-Mp-CUjdiexokVSa8s87Dts-YLkY9d9dy2SWSPuhfowr9XnBjuRBkv62kQMAFQzvxMiz0vdj-cLRTclH8xWYg4damLkJ_ugUXMUPEixKPMurLOlYL9GxlFaiIjvytj9g2Y53C2LrQWtrJakNuweHXSQsSSUiUl99mDBQzYC2Wg3QmGILCz7_bT4XH_FLYcMQt7QVTASmS_4ikFjIVe4QhWOMWXUFnY9TCYmUkqSYXPtDyd23rbnRU8xZosTH7FLWXH0PnbIs2AsfTmPq52WtIR2tLn1hcgsOR7YqXn_MWE7HLLh_FQdt-x6jSNKpxkFMeR3ZsQXHQzoRqdeb3S17Fe7XD58HhpSPBXcyDgqZK3uu84CLsR-CjY9h3xnKSTSepU9Nqa_KdGIa8Q9bpKAVpu2arnlW6Fxdh7_j9_cPpFS6Jk6mGMH0xh5JE_ZxhICXMlWYCIblD_YBV3HTE7FDGj1gbg-TT6inBnq8PbDXXEOfPa3K1OuqdDgHXvFLwqq0y1PXg3r0c2eYcMIUdS0DBjiIsu6sLqNwPJvdwI-B_aucHCha6ZHNUrSEbLJVqw3HWlZ-CgSSLa_G8JYjzp2k4Lw2HaZd2cYP2H25ZIfDac-mBtgutJN9pIzxvF-qrPatjXjRA8LyPj2H92cy2mKu7WXpvrvvs7JppiSNPVKJFzvR0RmMbvvONUnyQlnrXizwPgwKSOEFLzyl9kvsafzTXVdhUhb3Mo3WYFEng; .AspNetCore.Session=CfDJ8DgfkYSRB59EqqhuWGHNsd8Rf5SAzNzUXxufiopkJheFoufaoaYs2XFLN%2FpaOO9pUyxt3J9noimn8wgCl3vxbuAPNJ0tsqR%2FBiEn0YU2SOFLrPVhGgZ6kd0rn3tmhPHyrZTSVGP%2Ftvow8CPdWg8USxbMhwtKrcwaKq56tmhqcjUm
Host: [redacted-url]
Referer: http://[redacted-url]/Inspecao/Cadastrar
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Origin: http://[redacted-url]
Upgrade-Insecure-Requests: 1

DataAlteracao=&DataInclusao=&Municipio=São+Vicente&Data=13/08/2018&Hora=09:31&

There were other parameters in the body, but I’ve removed them for brevity. You can find all of them on the provided log. Also, note that in the log, the body was url-encoded. We tested both replaying them url-encoded and decoded, both result in our code being run, which is what is really important here.

Edit Some more info: We have this same application deployed to two different physical servers. Only one of them is having these issues, however. These are the differences I managed to gather between the two (italic being the one presenting these issues):

Windows Server 2016 vs Windows Server 2008
Azure VM vs Physical Server
Multiple (20+) IIS Websites, all runing ASP.NET Core 2 and 3 running WebForms under .NET 4.5 vs 2 IIS Websites running ASP.NET Core 2
16 GB RAM vs 8GB

@JunTaoLuo

Since I’ve recently worked on aspnet/KestrelHttpServer#1144, I am suspicous of the [redacted-url] in your Referer header. My hunch is that it may have non-standard-ASCII characters, judging from the fact that you have content such as Municipio=São+Vicente. If that is the case, they I would suggest trying the same request on 2.2.0-preview2 which is where we started to accept UTF-8 encoded header values.

If it is not the case, can you provide us logs with ConnectionLogging turned on so we may examine what Kestrel received? That would help us narrow down which component set the 400 bad request error.

@andre-ss6



Copy link


Contributor

Author

Yea, I had seen that issue. However, unfortunately, no, there are no non-standard characters in none of the urls.

And what exactly is ConnectionLogging? How do I turn it on?

@JunTaoLuo

@andre-ss6



Copy link


Contributor

Author

Ok thanks. I see, however, that’s available only on Asp.Net Core 2.1, and our project is 2.0 currently. We’ll update it here and then enable connection logging. I’ll post back when I have any updates.

@andre-ss6



Copy link


Contributor

Author

We’ve just updated our app to 2.1 and enabled Connection Logging in two of our websites. If we see anything I’ll post here.

However, there’s something else I wanted to share. While looking at the failed request traces, I noticed this one: https://pastebin.com/XEZQkd10

TDLR:

Situation #2

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>3</Level>
  <Opcode>16</Opcode>
  <Keywords>0x100</Keywords>
  <TimeCreated SystemTime="2018-09-12T14:38:43.399Z"/>
  <Correlation ActivityID="{800000C0-0000-EB00-B63F-84710C7967BB}"/>
  <Execution ProcessID="9504" ThreadID="11988"/>
  <Computer>siip</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{800000C0-0000-EB00-B63F-84710C7967BB}</Data>
  <Data Name="ModuleName">AspNetCoreModule</Data>
  <Data Name="Notification">128</Data>
  <Data Name="HttpStatus">400</Data>
  <Data Name="HttpReason">Bad Request</Data>
  <Data Name="HttpSubStatus">0</Data>
  <Data Name="ErrorCode">2147952454</Data>
  <Data Name="ConfigExceptionInfo"></Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>MODULE_SET_RESPONSE_ERROR_STATUS</Opcode>
  <Keywords>
   <Keyword>RequestNotifications</Keyword>
  </Keywords>
  <freb:Description Data="Notification">EXECUTE_REQUEST_HANDLER</freb:Description>
  <freb:Description Data="ErrorCode">An existing connection was forcibly closed by the remote host.
 (0x80072746)</freb:Description>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{002E91E3-E7AE-44AB-8E07-99230FFA6ADE}</EventGuid>
 </ExtendedTracingInfo>
</Event>

Now, of course this one returned 400 because, as the log says, the connection was closed by the client, as opposed to the first log I showed on the OP, which has no error message whatsoever — like this:

Situation #1 (as in OP)

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>3</Level>
  <Opcode>16</Opcode>
  <Keywords>0x100</Keywords>
  <TimeCreated SystemTime="2018-09-12T14:09:37.264Z"/>
  <Correlation ActivityID="{80000056-0003-F500-B63F-84710C7967BB}"/>
  <Execution ProcessID="9504" ThreadID="4612"/>
  <Computer>siip</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{80000056-0003-F500-B63F-84710C7967BB}</Data>
  <Data Name="ModuleName">AspNetCoreModule</Data>
  <Data Name="Notification">128</Data>
  <Data Name="HttpStatus">400</Data>
  <Data Name="HttpReason">Bad Request</Data>
  <Data Name="HttpSubStatus">0</Data>
  <Data Name="ErrorCode">0</Data>
  <Data Name="ConfigExceptionInfo"></Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>MODULE_SET_RESPONSE_ERROR_STATUS</Opcode>
  <Keywords>
   <Keyword>RequestNotifications</Keyword>
  </Keywords>
  <freb:Description Data="Notification">EXECUTE_REQUEST_HANDLER</freb:Description>
  <freb:Description Data="ErrorCode">The operation completed successfully.
 (0x0)</freb:Description>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{002E91E3-E7AE-44AB-8E07-99230FFA6ADE}</EventGuid>
 </ExtendedTracingInfo>
</Event>

So, while Situation #1 has some clear issue with it, since, as I understand, if the handler completed succesfully, it had to have invoked my code (the middleware pipeline)… still, I do think that in both of these situations my code should have run. I understand that in Situation #2 some network problem happened, however I don’t see why is that an excuse to not run the full pipeline. After all, the request had already reached Asp.Net Core and I want my logs to run whenever a request reaches Asp.Net Core.

EDIT

Oh, btw, I forgot to mention: in this last log I shared (the 400 because of connection drop), nothing was on our logs again (because, of course, as I said, our code didn’t run). So I’m guessing that enabling Connection Logging won’t do much good because our logs probably won’t run. Stdout logging is enabled this time though, so maybe that helps somehow.

EDIT 2

I find it interesting that these traces report the timeTaken for the request as 0, especially the most weird ones (like the one I originally reported, in which the ASP.NET Core Module says there were no errors albeit having returned 400 and not running our code).

EDIT 3

Well, things just got weirder. We’ve just seen a lot of requests that have been logged by ASP.NET logging as having returned 302 or 200, however IIS logged them as having returned 400. Unfortunately ConnectionLogging wasn’t enabled by the time those requests were logged, so I have nothing for now. I’ve checked time taken (maybe the requests were reaching timeout just at the last milisec?) but I’ve confirmed that is not the issue, since it happened with requests ranging from milliseconds of time taken to more than 10 seconds.

@muratg

@andre-ss6



Copy link


Contributor

Author

I’m sorry for being away all this time. No, unfortunately we couldn’t manage to find anything else. The 400s wouldn’t appear in our logs even when Connection Logging was enabled. Those requests really seemed to be responded either in ANCM or in Kestrel, before reaching the actual application code.

About the requests I mentioned in the last edit, which return 400 but are logged as normal responses in our logs: they seem to represent another problem. We think they happen when you make a double submit with some time in between them (like .5s). Then, what happens is that, according to the logs, ASP.NET returns a normal response to both (like 200 or 304 — and yes, we managed to get these ones logged with Connection Logging enabled) but IIS/Kestrel/ANCM (?) returns 400. However, those are different from the problem I originally reported, because those are logged by our code. Also, those have a real timeTaken, while in the original problem timeTaken is 0. Unfortunately we haven’t had time to try to replicate this double submit issue in a sample application though.

In the end, what we noticed is that as we updated our apps to ASP.NET Core 2.1, the problem started to disappear.

I will keep an eye on it though. If I manage to find anything else, I’ll post here. If you want to close the issue, though, I’m fine with it.

Edit: even though we couldn’t find the root cause of this problem, I still stand by what I said in my last reply: I think that, independently of anything, if a request reaches IIS, application code should always run. Or at least there should be a way to hook into Kestrel in order to log absolutely all requests.

Edit 2: Ok, I just now understood that those logs actually already are Kestrel logs, right? If that’s the case, then I guess we have two options left: ANCM is returning 400 before Kestrel (is this possible? I asked this elsewhere but got no answer) or Kestrel is returning before logging anything (which seems unlikely — although that’s exactly what’s happening here, funnily enough 😛 ). In any case, it’s hard to know for sure because, as I said, the problem seemed to have disappeared after we upgraded to 2.1. Well, thinking about it, we actually made another change during this process: we switched to SCD (instead of FDD). Maybe that was what helped? 🤔

@andre-ss6



Copy link


Contributor

Author

Ok those were a lot of edits. Maybe I should have posted another reply instead haha. I’m justing posting this one to make sure that you see my latest edits in the case that you had already seen the reply without the edits.

@Tratcher

ConnectionLogging is the lowest possible level of logging in Kestrel and it tracks every byte of data sent and received. It’s not possible for Kestrel to send a 400 without it showing up there.

ANCM does not generate 400 responses, but IIS/Http.Sys can. It will do this for things like disallowed characters in the URL. I think the only log that captures those is ETW.

@andre-ss6



Copy link


Contributor

Author

I guess it was not IIS because, as reported in the OP, the failed request Trace reports ANCM as having run successfully.

@mastrauckas

I appeared to have the same issue. So having code that looks like this

public class ClientHelper
{
     public HttpClient Client { get; }
     public ExternalApiHelper( HttpClient client)
     {
          Client = client;
     }

     public async Task<HttpResponseMessage> SendAsync(HttpMethod method, string url, object requestObject = null)
     {
          var requestString = JsonConvert.SerializeObject(requestObject);
          HttpRequestMessage request = new HttpRequestMessage()
            {
                Method = method,
                RequestUri = new Uri(url),
                Content =  new StringContent(requestObject, Encoding.UTF8, "application/json")
            };

            var response = await Client.SendAsync(request);
            if (response.StatusCode != HttpStatusCode.OK)
          {
               throw new Exception("HTTP Response was not OK")
          }
          var responseContent = await response.Content.ReadAsStringAsync();
          return JsonConvert.DeserializeObject<T>(responseContent);
     }
}

Now if I call this method like this:

client.SendAsync(HttpMethod.Get, url);
client.SendAsync(HttpMethod.Get, url, "");
client.SendAsync(HttpMethod.Get, url); 

Ater the first client.SendAsync(HttpMethod.Get, url);, a line after will get

HTTP/1.1 400 Bad Request
Connection: close
Date: Wed, 24 Oct 2018 20:32:27 GMT
Server: Kestrel
Content-Length: 0

Notice how the Connection: close? It appears the connection is getting corrupt?

If you change the code from

Content =  new StringContent(requestString, Encoding.UTF8, "application/json")

to

Content = HttpMethod.Get == method ? null : new StringContent(requestString, Encoding.UTF8, "application/json")

Everything works. This also appears to happen on macOS and Linux but not Winodws 10.

@Tratcher

@mastrauckas why are you sending GET requests with request bodies? Very few servers allow that.

@andre-ss6



Copy link


Contributor

Author

I see. A GET request with a body is returning 400. I think that’s against the specification, right? IIRC, the body SHOULD be ignored, but the request should not return 400 just because of that. In any way, as nice as it would be to have servers properly handle that, this is so uncommonly implemented that I think it’s pretty useless.

Regarding the issue, I’m pretty sure that’s not my case. The case I reported on the OP is a POST request (most — if not all — of the requests that presented that problem were POST). Also, the most important thing here is not actually the 400, but the IIS trace.

@mastrauckas

What makes this hard to troubleshoot is that you can use middleware to catch the exceptions or use UseExceptionHandler and neither would catch this.

To also make this happen and close the connection with a BadRequest, you need to use the shared HttpClient on multiple request after sending the word null in the body before the connection gets corrupted and Kestrel sends the 400 Bad Request.

As far as a POST, I was getting the BadRequest on a POST. I had a shared HttpClient that went like this:

GET with a null in the body and action gets called.
Maybe more GET’s with null body, not sure on this.
POST with a good body and got 400 Bad Request with a closed connection and my action never getting called.

Anyway, I was also putting this on here to help others in the future that might come to this thread.

@mastrauckas

@mastrauckas why are you sending GET requests with request bodies? Very few servers allow that.

It was a bug in our system.

The problem is Kestrel did not send a BadRequest when sending a body with a GET request. It was 2 or 3 request later on a different request that I got the BadRequest.

As I mentioned, I sent a GET with a body and it hit my action and got an Ok status back but on a later call I called with a completely valid POST and got a BadRequest back without even hitting my action.

If it had gotten a BadRequest when sending a GET with a body that would make sense. However, I didn’t.

This also only happens on macOS and Linux but doesn’t happen on Windows 10.

@andre-ss6



Copy link


Contributor

Author

Do you have Failed Request Traces of that?

@aspnet-hello
aspnet-hello

transferred this issue from aspnet/KestrelHttpServer

Dec 13, 2018

@stijnherreman

We’re also experiencing this occasionally with apps hosted as Virtual Applications in an App Service. When it happens, it’s always after a deploy. Even a GET to the root returns a 400.
Enabling logging causes the app to restart, after which the issue disappears. Stopping and starting the App Service also makes the issue disappear.

HTTP/1.1 400 Bad Request
Server: Kestrel
X-Powered-By: ASP.NET
Set-Cookie: ARRAffinity=[redacted]
Date: Tue, 18 Dec 2018 14:00:22 GMT
Content-Length: 0

I’ll configure our apps to have logging enabled by default and I’ll configure connection logging, so hopefully the next time it occurs I can post some logs.

@stijnherreman

I’ve created a new issue #5699 because I don’t know if our issues are related.

@AndreasTurowski

We have a similar problem. Our Controller (running in docker on linux, .Net core 2.2, service routing with traefik) is called by a proxy. The client test code sends a post request to the proxy that returns an error status code (NotFound, Forbidden etc.). The next call from the proxy will leads to BadRequest and our controller code is not invoked. We can see the BadRequest in traefik log, so we know that the proxy is not the problem. If we slow down the calls to a call frequency of 1 call in 2 seconds we have no problem. That looks like a DOS prevention. I hope we get some help, because this is absolutely critical in our project.

@andre-ss6



Copy link


Contributor

Author

That’s interesting. We didn’t try, back when this was happening, to slow down the requests and see how that would affect the rate at which the problem appears. It’s also interesting because, as I reported in one of my earlier replies, we managed to track down one of the 400 issues (not the originally reported, because that one has some different peculiarities, like timeTaken of 0 and a successful error code) to being caused by sending two identical requests in a small time frame.

@animalcaretechnologies

I am having the same issue as AndreasTurowski. I have not solved it yet, but it appears to only happen when the connection is kept alive between multiple requests. I see the following error logged in kestrel.

dbug: Microsoft.AspNetCore.Server.Kestrel[26]
Connection id «0HLKSTHRBLL2M», Request id «0HLKSTHRBLL2M:00000002»: done reading request body.
info: Microsoft.AspNetCore.Server.Kestrel[17]
Connection id «0HLKSTHRBLL2M» bad request data: «Invalid request line: ‘1x0Dx0A'»
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Invalid request line: ‘1x0Dx0A’

@animalcaretechnologies

Turns out it has nothing to do with keep-alive header. My issue was a traefik bug. One request was adding the header «expect:100-continue» and traefik does not forward correctly when that header is present. It was not actually forwarding the post data.

traefik/traefik#2899

@AndreasTurowski

After a while and some updates of .net core, the problem has changed its face. Now we get a 505 Status Code (Http version not supported). Our client is an old piece of software that sends requests with HTTP/1.0 and «Connection: close»-Header to a proxy. That proxy keeps the Connection: close in the header but sends the request as HTTP/1.1 to our controller. After changing the proxy code to send the request with the original HTTP/1.0 protocol, everything works fine. I think, we can close this issue.

@nizarelouaer

I am having the same issue. My client is sending a POST request with a JSON Body. My services is a .net core 3.1 web api. When I send a POST request I am receiving 400 BAD Request. I analyzed the request and saw that the header has the key:
«»»»
Connection | Upgrade, HTTP2-Settings
«»»»
This is actually causing the problem. I cannot modify the headers because I have no control on the client app. IS there a workaround in the kerstel settings ?
Thank you

@nicoske

We had the same issue with nginx and we solved it by forward the connection header received from the client:

proxy_set_header Connection $http_connection;

Instead of

proxy_set_header Connection "Upgrade";

@themisir

We had the same issue with nginx and we solved it by forward the connection header received from the client:

proxy_set_header Connection $http_connection;

Instead of

proxy_set_header Connection "Upgrade";

Thank you so much, this worked for me. Also I’m wondering why this issue is happening.

@msftbot

Thank you for contacting us. Due to a lack of activity on this discussion issue we’re closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn’t been addressed yet, please file a new issue.

This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue!

@msftbot
msftbot
bot

locked as resolved and limited conversation to collaborators

Dec 12, 2020

Понравилась статья? Поделить с друзьями:
  • Module object is not callable python ошибка
  • Module object is not callable error
  • Module not found error python
  • Module not found error pygame
  • Module not found error pycharm