ID c?a bi: 820729
Bung t?t c? | Thu g?n t?t c?

? Trang ny

Tm t?t

Bai vit nay m ta cac kha nng ghi nht ky li cua API Giao thc Truyn tai Siu vn ban (HTTP).

Mt s li xay ra trong ng dung da trn HTTP c t ng x ly bng API HTTP thay vi c truyn tra lai cho ng dung x ly. Hanh vi nay xay ra do tn sut cac li nay co th xut hin qua nhiu trong nht ky s kin hoc trinh x ly ng dung.

Cac chu sau m ta nhng khia canh khac nhau cua ghi nht ky li API HTTP:
  • C?u h?nh ghi nh?t k? l?i API HTTP
    Cac thit t ng ky kim soat cac li trong nht ky API HTTP, kich c c cho phep ti a cua cac tp nht ky va vi tri cua cac tp nht ky.
  • ?nh d?ng c?a nht ky l?i API HTTP
    API HTTP tao cac tp nht ky tun thu cac quy c tp nht ky World Wide Web Consortium (W3C). Ban co th s dung cac cng cu tiu chun phn tich cu phap cac tp nht ky nay. Tuy nhin, khng ging nh tp nht ky W3C, tp nht ky API HTTP khng cha tn ct.
  • Cc lo?i l?i ma API HTTP ghi
    HTTP API ghi l?i m?t lo?t cc l?i ph? bi?n.

Thng tin thm

Cu hinh ghi nht ky li API HTTP

yu cu chung ti cu hinh ghi nht ky li API HTTP cho ban, hay i ti phn "Khc phuc s c cho ti". Nu ban mun t cu hinh ghi nht ky li API HTTP, hay i ti phn " ti t khc phuc s c".

Kh?c ph?c s? c? cho ti



? kh?c ph?c s? c? ny t? ?ng, hay b?m vo nt ho?c lin k?t Kh?c ph?c s? c?. Trong hp thoai Tai xung Tp, bm Chay, ri lam theo cac bc trong Thut sy Khc phuc s c.

Disable HTTP API error logging
Microsoft Fix it 50635
Enable HTTP API error logging
Microsoft Fix it 50634


Chu y
  • Thut sy nay co th chi co bng ting Anh. Tuy nhin, khc phuc s c t? ?ng c?ng ho?t ?ng ?i v?i cc phin b?n ngn ng? khc c?a Windows.
  • Nu ban hin khng lam vic trn may tinh co s c, hay lu giai phap Khc phuc s c vao ia flash hoc CD, ri chay trn may tinh co s c.



ti t khc phuc s c

Ba gia tri ng ky trong khoa Thng s HTTP kim soat ghi nht ky li API HTTP. Cac khoa nay nm khoa ng ky sau:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
Chu y Vi tri va hinh thc cua cac gia tri cu hinh co th thay i nhng phin ban sau cua h iu hanh Microsoft Windows.

Ban phai co uy nhim Quan tri vin/H thng Cuc b thay i gia tri ng ky va xem hoc sa i cac tp nht ky va cp co cha cac gia tri o.

Thng tin cu hinh trong gia tri ng ky c oc khi trinh iu khin API HTTP khi ng. Vi vy, nu ban thay i thit t, ban phai dng ri khi ng lai trinh iu khin oc gia tri mi. thc hin vic nay, nhp cac lnh ban iu khin sau:
net stop http
net start http
Quy c t tn sau c s dung t tn tp nht ky:
httperr + s trinh t + .log
Vi du: httperr4.log
Cac tp nht ky c tai s dung khi cac tp o at kich c ti a ma gia tri ng ky ErrorLogFileTruncateSize xac inh. Gia tri nay khng th nho hn 1 megabyte (MB).

Nu cu hinh cua ghi nht ky li khng hp l hoc nu xay ra bt ky loai li nao trong khi API HTTP ang ghi vao tp nht ky, API HTTP s dung ghi nht ky s kin thng bao cho quan tri vin rng ghi nht ky li o hin khng xay ra.

B?ng sau m t? gi tr? c?u h?nh s? ng k?.
Thu g?n b?ng nyBung r?ng b?ng ny
Gi tr? ng k?M ta
EnableErrorLoggingDWORD ma ban co th t thanh TRUE cho phep ghi nht ky li hoc thanh FALSE v hiu hoa ghi nht ky li. Gi tr? m?c ?nh l TRUE.
ErrorLogFileTruncateSizeDWORD xac inh kich c ti a cua tp nht ky, tinh bng byte. Gi tr? m?c ?nh l 1 MB (0x100000).

Chu y Gia tri c xac inh khng th nho hn gia tri mc inh.
ErrorLoggingDirChui xac inh cp ni API HTTP t tp ghi nht ky.

API HTTP tao cp con HTTPERR trong cp c xac inh, ri sau o lu tr tp nht ky trong cp con. Cp con nay va tp nht ky nhn cung thit t quyn. Quan tri vin va Tai khoan H thng Cuc b co y u quyn truy nhp. Nh?ng ng?i dng khc khng c quy?n truy nh?p.

Muc sau y la cp mc inh khi cp khng c xac inh trong s ng ky:
%SystemRoot%\System32\LogFiles

Chu y Gia tri chui ErrorLoggingDir phai la ng dn cuc b u iu kin. Tuy nhin, n c th? ch?a cc %SystemRoot%. Khng th s dung mt ia mang hoc chia se mang.

inh dang cua nht ky li API HTTP

Thng thng, tp nht ky li API HTTP co cung inh dang nh cac nht ky li W3C, ngoai tr rng cac tp nht ky li API HTTP khng cha muc ct. Mi dong cua nht ky li API HTTP ghi mt li. Cac trng xut hin theo trinh t cu th. Mt ky t du cach (0x0020) phn tach mi trng vi trng trc o. Trong mi trng, cac du cng (0x002B) thay th cac ky t du cach, tab va cac ky t iu khin khng th in c.

Bang sau xac inh cac trng va trinh t cac trng trong ban ghi li.
Thu g?n b?ng nyBung r?ng b?ng ny
TrngM ta
NgayTr?ng Ngay theo ?nh d?ng W3C. Trng nay da trn Gi Chun Quc t (UTC). Trng Ngay lun co 10 ky t theo dang DD-MM-YYYY. Vi du, ngay 1 thang 5 nm 2003 c th hin la 01-05-2003.
GiTr?ng Gi theo ?nh d?ng W3C. Trng nay da trn UTC. Trng gi lun co 8 ky t theo dang HH:MM:SS. Vi du: 5:30 Chiu (UTC) ?c th? hi?n la 17:30:00.
?a ch? IP c?a May khach?a ch? IP c?a my khach b? ?nh h?ng. Gia tri trong trng nay co th la ia chi IPv4 hoc ia chi IPv6. Nu ia chi IP may khach la ia chi IPv6, trng ScopeId cung c bao gm trong ia chi.
Cng May khachS? c?ng cho may khch b? ?nh h?ng.
ia chi IP May chu?a ch? IP c?a my ch? b? ?nh h?ng. Gia tri trong trng nay co th la ia chi IPv4 hoc ia chi IPv6. Nu ia chi IP may chu la ia chi IPv6, trng ScopeId cung c bao gm trong ia chi.
Cng May chuS cng cua may chu bi anh hng.
Phin b?n Giao th?cPhin ban cua giao thc ang c s dung.

Nu kt ni khng c phn tich cu phap y u xac inh phin ban giao thc, mt du gach ni (0x002D) c s dung di dang trinh gi ch cho trng trng.

Nu s phin ban chinh hoc s phin ban phu c phn tich cu phap la ln hn hoc bng 10, phin ban c ghi di dang HTTP/?.?.
?ng t?Trang thai ng t ma yu cu cui cung c phn tich cu phap thng qua. Cac ng t khng xac inh c bao gm, nhng bt ky ng t nao ln hn 255 byte bi ct bt xung dai nay. Nu mt ng t khng sn co, mt du gach ni (0x002D) c s dung di dang trinh gi ch cho trng trng.
CookedURL + Truy v?nURL va bt ky truy vn nao lin quan n URL o c ghi di dang mt trng c phn tach bi du hoi (0x3F). Trng nay c ct bt xung gii han dai cua trng la 4096 byte.

Nu URL nay a c phn tich cu phap ("cooked"), URL o c ghi vi chuyn i trang ma cuc b va c xem la trng Unicode.

Nu URL nay khng c phn tich cu phap ("cooked") trong luc ghi, URL o c sao chep chinh xac ma khng co bt ky chuyn i Unicode nao.

Nu API HTTP khng th phn tich cu phap URL nay, mt du gach ni (0x002D) c s dung di dang trinh gi ch cho trng trng.
Tinh trang Giao thcTinh trang giao thc khng th ln hn 999.

Nu co tinh trang giao thc cua phan hi cho mt yu cu, tinh trang o se c ghi trong trng nay.

Nu khng co tinh trang giao thc, mt du gach ni (0x002D) c s dung di dang trinh gi ch cho trng trng.
SiteIdKhng ?c s? d?ng trong phin b?n ny c?a API HTTP. M?t d?u gach n?i gi? ch? (0x002D) lun xu?t hi?n trong trng ny.
Cum t Ly doTrng nay co cha chui xac inh loai li ang c ghi. Trng nay khng bao gi c trng.
Tn Hang iTrng nay yu cu tn hang ?i.
Cac dong mu sau la t mt nht ky li API HTTP:
2002-07-05 18:45:09 172.31.77.6 2094 172.31.77.6 80 HTTP/1.1 GET /qos/1kbfile.txt 503 ConnLimit 2002-07-05 19:51:59 127.0.0.1 2780 127.0.0.1 80 HTTP/1.1 GET /ThisIsMyUrl.htm 400 Hostname 2002-07-05 19:53:00 127.0.0.1 2894 127.0.0.1 80 HTTP/2.0 GET / 505 - Version_N/S 2002-07-05 20:06:01 172.31.77.6 64388 127.0.0.1 80 - - - - - Timer_MinBytesPerSecond

Loai li ma API HTTP ghi lai

API HTTP ghi tra li li cho may khach, kt ni ht thi gian ch, yu cu n le va kt ni bi gian oan ma c x ly khng ung.

Danh sach sau xac inh cac loai li ma API HTTP ghi:
  • Tra li may khach API HTTP gi tra li li cho may khach, vi du: mt li 400 do li phn tich cu phap trong yu cu nhn c cui cung. Sau khi API HTTP gi tra li li, API kt thuc kt ni.
  • Kt ni ht thi gian ch API HTTP ht thi gian ch kt ni. Nu mt yu cu ang ch x ly khi kt ni ht thi gian ch, yu cu c s dung cung cp thm thng tin v kt ni trong nht ky li.
  • Yu cu n le Mt quy trinh ch ngi dung thoat t ngt trong khi vn co cac yu cu hang i c inh tuyn ti quy trinh o. API HTTP ghi cac yu cu n le trong nht ky li.
Cac loai li cu th c chui Cum t Ly do chi inh ma lun xut hin la trng cui cung cua tng dong li. B?ng sau y xc ?nh C?m t? L? do API HTTP.
Thu g?n b?ng nyBung r?ng b?ng ny
Cum t Ly doM ta

AppOfflineM?t d?ch v? khng c l?i x?y ra (m?t l?i HTTP 503). Dich vu khng kha dung do li ng dung lam cho ng dung ngoai tuyn.
AppPoolTimerM?t d?ch v? khng c l?i x?y ra (m?t l?i HTTP 503). Dich vu khng kha dung do quy trinh nhom ng dung qua bn khng th giai quyt yu cu.
AppShutdowna xay ra li d?ch v? khng c (m?t l?i HTTP 503). Dich vu khng kha dung vi ng dung t ng tt tra li chinh sach quan tri vin.
BadRequestM?t l?i phn tch cu phap ? x?y ra trong khi x? l? m?t yu c?u.
Client_ResetKt ni gia may khach va may chu bi ong trc khi yu cu co th c chi inh cho quy trinh x ly ring bit. Nguyn nhn ph bin nht cua hanh vi nay la may khach ong kt ni vi may chu sm.
Connection_Abandoned_By_AppPoolQuy trinh x ly ring bit t nhom ng dung a ong t ngt hoc bo qua mt yu cu ang ch x ly bng cach ong iu khin.
Connection_Abandoned_By_ReqQueueQuy trinh x ly ring bit t nhom ng dung a ong t ngt hoc bo qua mt yu cu ang ch x ly bng cach ong iu khin. Cu th cho Windows Vista va Windows Server 2008.
Connection_DroppedKt ni gia may chu va may khach bi ong trc khi may chu co th gi goi tra li cui cung. Nguyn nhn ph bin nht cua hanh vi nay la may khach ong kt ni vi may chu sm.
Connection_Dropped_List_FullDanh sach kt ni bi gian oan gia may khach va may chu a y. Cu th cho Windows Vista va Windows Server 2008.
ConnLimita xay ra li d?ch v? khng c (m?t l?i HTTP 503). Dich vu khng kha dung bi vi a at hoc vt qua gii han kt ni cp trang web.
Connections_RefusedB nh NonPagedPool loi a giam xung di 20MB and http.sys a ngng nhn kt ni mi.
V hiu hoaa xay ra li d?ch v? khng c (m?t l?i HTTP 503). Dich vu khng kha dung do quan tri vin a lam cho ng dung ngoai tuyn.
EntityTooLargeMt thc th vt qua kich c ti a c cho phep.
FieldLengtha vt qua gii han dai cua trng.
Bi cma gp phai m?t yu t hoc chui bi cm trong khi phn tich cu phap.
Tiu ?a xay ra l?i phn tch c php ? m?t tiu ?.
Tn my ch?a xay ra l?i phn tch cu phap trong khi x? l? Tn may chu.
N?i b?a xay ra l?i my ch? n?i b? (m?t l?i HTTP 500).
Invalid_CR/LFa xay ra m?t tr? v? v?n chuy?n b?t h?p php ho?c ?ng dy ngu?n c?p d? li?u.
LengthRequiredGi tr? dai yu cu bi thiu.
KHNG SN COa xay ra li d?ch v? khng c (m?t l?i HTTP 503). Dich vu khng kha dung do li ni b (nh li phn b b nh) a xay ra.
N/Ia xay ra li khng c trin khai (li HTTP 501) hoc a xay ra li dich vu khng kha dung (li HTTP 503) do vic ma hoa chuyn khng xac inh.
S:a xay ra li phn tch c php trong khi x? l? m?t s.
i?u ki?n tin quy?tM?t i?u ki?n tin quy?t c yu cu bi thiu.
QueueFulla xay ra li d?ch v? khng c (m?t l?i HTTP 503). Dich vu khng kha dung bi hang i yu cu ng dung a y.
RequestLengtha vt qua gii han dai cua yu cu.
Timer_AppPoolKt ni ht han do yu cu a i qua lu trong hang i nhom ng dung ng dung may chu bo xp hang i va x ly yu cu o. Khoang thi gian ch nay la ConnectionTimeout. Theo m?c ?nh, gi tr? ny ?c t 2 pht.
Timer_ConnectionIdleK?t n?i ? h?t h?n v v?n c?n nhn r?i. Khoang thi gian ConnectionTimeout mc inh la 2 phut.
Timer_EntityBodyK?t n?i ? ht han tr?c khi ni dung thc th yu cu ti. Khi ro rang la yu cu co ni dung thc th, API HTTP bt thit bi bm gi Timer_EntityBody. Ban u, gii han cua thit bi bm gi nay c t gia tri ConnectionTimeout (thng la 2 phut). Mi khi du hiu d liu khac c nhn trn yu cu nay, API HTTP t lai thit bi bm gi cung cp cho kt ni thm hai phut na (hoc bt ky gia tri nao c xac inh trong ConnectionTimeout).
Timer_HeaderWaitKt ni ht han do vic phn tich cu phap tiu cho mt yu cu mt nhiu thi gian hn gii han mc inh 2 phut.
Timer_MinBytesPerSecondKt ni ht han do may khach khng nhn c tra li vi tc hp ly. Tc gi tra li chm hn mc inh 240 byte/giy. iu nay co th c iu khin bng thuc tinh siu d liu MinFileBytesPerSec.
Timer_ReqQueueKt ni ht han bi vi yu cu a i qua lu trong hang i nhom ng dung ng dung may chu bo xp hang i. Khoang thi gian ch nay la ConnectionTimeout. Theo m?c ?nh, gi tr? ny ?c t 2 pht. Cu th cho Windows Vista va Windows Server 2008
Timer_ResponseDnh ring. Hin khng c s dung.
Timer_SslRenegotiation Kt ni ht han do s thng lng lai SSL gia may khach va may chu mt nhiu thi gian hn thi gian ch mc inh 2 phut.
URLa xay ra li phn tich cu phap khi x ly URL.
URL_LengthM?t URL v?t qu kich c cho phep ti a.
?ng t?a xay ra l?i phn tch c php trong khi x? l? m?t ng t.
Version_N/Sa xay ra li phin b?n khng c h? tr? (m?t l?i HTTP 505).

Tham kh?o

bit thm thng tin v cach thm cac trng ghi nht ky b sung cho ghi nht ky li HTTP, hay bm vao s bai vit sau xem bai vit trong C s Kin thc Microsoft:
832975 Cac thuc tinh b sung hin kha dung ghi trong tp Httperr#.log trong IIS 6.0 va IIS 7.0 (Trang nay co th co bng ting Anh)

Thu?c tnh

ID c?a bi: 820729 - L?n xem xt sau cng: 30 Thang Mi Mt 2012 - Xem xt l?i: 4.0
T? kha:
kbhttphandlers kbhttp kbapi kberrmsg kbinfo kbfixme kbmsifixme KB820729

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com