Reputation: 5016
My web application is setup for cookieless sessions:
<sessionState cookieless="true" regenerateExpiredSessionId="true" />
When I run a request direct to the web server, it works:
GET /TestWebProject/(S(qttapzkxlzjxb3mjugnjivav))/RequestReflector.aspx HTTP/1.1
Host: localhost
Connection: keep-alive
traceparent: 00-b940d55f7424696f950fd4a748983262-fb0808628749599f-00
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 15 Jan 2025 00:56:13 GMT
Content-Length: 1262
However, if I run the request through the reverse proxy, it fails with a 404.4:
TTP Error 404.4 - Not Found
The resource you are looking for does not have a handler associated with it.
Most likely causes:
The file extension for the requested URL does not have a handler configured to process the request on the Web server.
Things you can try:
If the file extension does not have a handler associated with it, add a handler mapping for the extension.
Verify that the handler associated with the file extension is properly installed and configured.
Check the failed request tracing logs for additional information about this error. For more information, click here.
Detailed Error Information:
Module IIS Web Core
Notification MapRequestHandler
Handler Not yet determined
Error Code 0x8007007b
GET http://localhost/TestWebProject/(S(qttapzkxlzjxb3mjugnjivav))/RequestReflector.aspx HTTP/1.1
Host: localhost
Connection: keep-alive
traceparent: 00-856739580de6a5867b4bf03fa6b3bb90-318d81b2ef8709da-00
Response
HTTP/1.1 404 Not Found
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Wed, 15 Jan 2025 00:56:05 GMT
Content-Length: 5282
These HTTP requests and responses are from Wireshark capturing traffic to the server from the browser, and also from the reverse proxy to the server. I don't think they are particularly helpful, obviously the one that works doesn't write the full URL in the first line but I don't think that matters (although I have tried to modify that for testing, I cannot).
Unless something jumps out as being the problem, how can I debug what is going on in ASP.NET to see why it is returning a 404?
I already tried enabling failed request tracing, but it didn't really shed any light:
52. -MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName
IIS Web Core
Notification
MAP_REQUEST_HANDLER
HttpStatus
404
HttpReason
Not Found
HttpSubStatus
4
ErrorCode
The filename, directory name, or volume label syntax is incorrect.
(0x8007007b)
ConfigExceptionInf
Upvotes: 0
Views: 43
Reputation: 12759
The error you are getting is not related with the cookie less setting. you can follow below steps to resolve the issue:
https://www.iis.net/downloads/microsoft/application-request-routing
After that go to the iis server, select server name
Choose Application Request Routing module
Upvotes: 1