Http

僅在首次訪問時出現 http 500 錯誤

  • October 17, 2021

第一次訪問網站時,我得到一個500 - Internal server error. 當我點擊重新載入時,該網站工作得很好,並將繼續工作。如果我打開其他瀏覽器或關閉並重新打開目前瀏覽器,則重複該過程。

http://motherscarehawaii.teamvision.biz/

伺服器在 windows server 2008 R2 + sp1 上執行 IIS7.5,這是伺服器上的許多虛擬主機之一,所有其他主機都執行良好。

我看到HTTP/1.1 GET / 503 32 Disabled motherscarehawaii.teamvision.biz列出C:\Windows\System32\LogFiles\HTTPERR\httperr1.log但不確定禁用了什麼。應用程序池設置為在經典模式下與 .Net Framework v2.0.50727 一起執行。

任何想法是導致錯誤的原因以及如何解決它?

這與會話 cookie 以及站點如何處理它們有關。

第一次通過,我最後沒有會話cookie,

$ wget --load-cookies cookies --save-cookies cookies --keep-session-cookies -S http://motherscarehawaii.teamvision.biz/
--2011-07-21 21:37:05--  http://motherscarehawaii.teamvision.biz/
Resolving motherscarehawaii.teamvision.biz (motherscarehawaii.teamvision.biz)... 206.72.120.169
Connecting to motherscarehawaii.teamvision.biz (motherscarehawaii.teamvision.biz)|206.72.120.169|:80... connected.
HTTP request sent, awaiting response...
 HTTP/1.1 500 Internal Server Error
 Cache-Control: private
 Content-Type: text/html
 Server: Microsoft-IIS/7.5
 Set-Cookie: ASPSESSIONIDASCRDQBC=GAONOAEADFONKBABDHPPMCLG; path=/
 X-Powered-By: ASP.NET
 Date: Thu, 21 Jul 2011 20:36:51 GMT
 Connection: keep-alive
 Content-Length: 1208
2011-07-21 21:37:05 ERROR 500: Internal Server Error.

第二遍,現在從文件中載入cookie,

$ wget --load-cookies cookies --save-cookies cookies --keep-session-cookies -S http://motherscarehawaii.teamvision.biz/
--2011-07-21 21:37:06--  http://motherscarehawaii.teamvision.biz/
Resolving motherscarehawaii.teamvision.biz (motherscarehawaii.teamvision.biz)... 206.72.120.169
Connecting to motherscarehawaii.teamvision.biz (motherscarehawaii.teamvision.biz)|206.72.120.169|:80... connected.
HTTP request sent, awaiting response...
 HTTP/1.1 200 OK
 Cache-Control: private
 Content-Length: 2843
 Content-Type: text/html
 Server: Microsoft-IIS/7.5
 X-Powered-By: ASP.NET
 Date: Thu, 21 Jul 2011 20:36:53 GMT
 Connection: keep-alive
Length: 2843 (2.8K) [text/html]
Saving to: `index.html'

100%[=======================================================================================================>] 2,843       --.-K/s   in 0.1s

2011-07-21 21:37:07 (24.1 KB/s) - `index.html' saved [2843/2843]

我希望這可以幫助您進一步追踪它。

引用自:https://serverfault.com/questions/292820