Lm th? no ?: G? l?i ph? bi?n c?a ng? giao di?n ?ng d?ng ch?y d?i IIS b?ng cch s? d?ng Visual Studio

D?ch tiu ? D?ch tiu ?
ID c?a bi: 238788 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?

? Trang ny

TM T?T

Bi vi?t ny-by-step m t? lm th? no ? g? l?i cc ?ng d?ng ph? bi?n c?a ng? giao di?n (CGI) l ch?y d?i Internet Information Services (IIS) b?ng cch s? d?ng b?t k? phin b?n no c?a Visual Studio.

G? l?i m?t ?ng d?ng tr?c quan CGI C b?ng cch s? d?ng Visual Studio

G? l?i m?t ?ng d?ng Visual C CGI b?ng cch s? d?ng b?t k? phin b?n no c?a Visual Studio, lm theo cc b?c sau:
  1. IIS Admin d?ch v? ph?i tng tc v?i my tnh ? bn. ? c?u h?nh ny, h?y lm theo cc b?c sau:
    1. M? B?ng i?u khi?n v lm theo cc b?c sau:
      • Dnh cho Windows NT: Click vo D?ch v?.
      • Cho Windows 2000, Windows XP, v.NET Server: Nh?p vo Cng c? qu?n tr?, v sau nh?p vo D?ch v?.
    2. B?m p IIS Admin d?ch v?.
    3. Trn cc ng nh?p tab, ch?n cc Cho php d?ch v? tng tc v?i Man hinh h?p ki?m.

      Chu y Bi vi?t ny gi? ?nh r?ng d?ch v? Admin IIS ch?y nh m?t ?a phng h? th?ng.
    4. Ng?ng v kh?i ?ng l?i d?ch v? Admin IIS.
  2. Tr?c khi b?n bao g?m cc t?p tin Windows.h, thm d?i y M?, v sau xy d?ng m?t phin b?n g? l?i c?a CGI:
    #define _WIN32_WINNT 0x0400
    					
  3. Dn o?n m? sau vo ?u CGI:
    #ifdef _DEBUG
    char szMessage [256];
    wsprintf (szMessage, "Please attach a debugger to the process 0x%X (%s) and click OK",
          GetCurrentProcessId(), argv[0]);
    MessageBox(NULL, szMessage, "CGI Debug Time!",
          MB_OK|MB_SERVICE_NOTIFICATION);
    #endif
    					
  4. Kh?i ?ng ?ng d?ng CGI.
  5. nh km tr?nh g? l?i (v d? nh WinDBG ho?c Visual C) ? CGI qu tr?nh trong khi h?p tin nh?n s? ?c hi?n th?.
  6. Khi tr?nh g? l?i ?c nh km, m? t?p tin m? ngu?n v ?t m?t break i?m, v sau b?m Ok.

    Khi h?p th ?c ng l?i, chng tr?nh CGI h? s v i?m ngh? s? ?c nh?n.

B?ng cch s? d?ng WinDBG

G? l?i m?t ?ng d?ng CGI v?i WinDBG, m?c d b?n khng c ? thay ?i b?t k? m?, b?n c?n ph?i ?c lm quen v?i WinDBG v ci ?t cc cng c? g? l?i. B?n c th? t?i v? cc cng c? g? l?i t? d?i y Web site c?a Microsoft:
Microsoft cng c? g? l?i
http://www.Microsoft.com/whdc/devtools/ddk/Default.mspx

?t ty ch?n d?ch v?

?t cc Th?c hi?n t?p tin h?nh ?nh l?a ch?n do khi d?ch v? (ho?c chng tr?nh CGI) kh?i ?ng, n b?t ?u theo tr?nh g? l?i. ?m b?o r?ng cc d?ch v? c th? tng tc v?i cc my tnh ? bn, theo h?ng d?n tr?c trong bi vi?t ny. N?u khng, khi chng tr?nh CGI b?t ?u, n t?i tr?nh g? l?i v b?n s? khng nh?n th?y n.
  1. Kh?i ?ng Registry Editor (Regedt32.exe):

    Nh?p vo B?t ?u, b?m Ch?y, v sau g? Regedt32.
  2. inh vi khoa ng ki sau:
    [HKEY_LOCAL_MACHINE NT\CurrentVersion\Image t?p tin th?c thi Options\]
  3. T?o m?t subkey v?i tn c?a b?n t?p tin th?c thi CGI (v d?, MyCGI.exe).
  4. ? ny subkey, thm gi tr? REG_SZ ?t tn tr?nh g? l?i v cc ?y ? ?ng d?n ?n tr?nh g? l?i, nhng b? qua ph?n m? r?ng ".exe". B?n c?ng c th? thm b?t k? l?nh cho tr?nh g? l?i. V? tr m?c ?nh ? ci ?t WinDBG l cc sau:
    "Debugger"="C:\\Debuggers\\windbg.exe"
    Chu y Con ?ng m i?m ?n tr?nh g? l?i WinDBG khng ch?a b?t k? d?u cch ho?c ph?n m? r?ng t?p tin. V d?, windbg, nh ?c hi?n th? ? y:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image t?p tin th?c thi Options\yourCGI.exe "Debugger"="C:\windbg"
  5. ng Registry Editor.
  6. Ng?ng v b?t ?u d?ch v? IISADMIN, v sau ch?y CGI chng tr?nh.

    Chu y Cho tr?nh g? l?i xu?t hi?n trn my tnh ? bn m?c ?nh, cc qu?n tr? IIS d?ch v? ph?i ch?y nh h? th?ng ?a phng, v b?n ph?i ch?n cc Cho php d?ch v? tng tc v?i my tnh ? bn h?p ki?m. ? c?u h?nh ny, i ?n b?c 1 c?a cc h?ng d?n tr?c trong bi vi?t ny.
  7. Tr?nh g? l?i s? b?t ?u khi h?nh ?nh cho cc d?ch v? t?p tin th?c thi ?c t?i vo b? nh?.
Chu y B?n c th? c?n ph?i thi?t l?p gi tr? c?a cc CreateProcessAsUser b?t ?ng s?n t?i metabase ? sai ? nh km m?t tr?nh g? l?i. i?u ny l b?i v? cc ti kho?n m CGI ch?y ?ng d?ng trong c th? khng k? th?a cc Cho php cc d?ch v? ? gi?i tri v?i my tnh ? bn thi?t ?t cho d?ch v? IIS admin khi t?p tin th?c thi CGI l sinh ra. B?n c th? dng o?n m? hnh chnh adsutil.vbs ? thi?t l?p cc Cho php cc d?ch v? ? gi?i tri v?i my tnh ? bn thi?t l?p. Theo m?c ?nh, thi?t l?p l s? th?t. V d?, s? d?ng l?nh sau y:
adsutil.VBS w3svc/CreateProcessAsUser "sai"

THAM KH?O

? bi?t thm chi ti?t v? g? l?i, b?m cc bi vi?t s? d?i y ? xem cc bi vi?t trong c s? ki?n th?c Microsoft:
273639 Lm th? no ?: B?t ?u IISAdmin v d?ch v? ph? thu?c theo m?t tr?nh g? l?i
286350 Lm th? no ?: S? d?ng ADPlus ? kh?c ph?c s? c? "Treo" v "Tai n?n"
261871 Thng tin: COM + v MTS g? l?i ti nguyn
183480 Lm th? no ?: G? l?i ISAPI DLLs d?i IIS 4.0 v IIS 5,0

Thu?c tnh

ID c?a bi: 238788 - L?n xem xt sau cng: 21 Thang Tam 2011 - Xem xt l?i: 2.0
p d?ng
  • Microsoft Internet Information Server 2.0
  • Microsoft Internet Information Server 3.0
  • Microsoft Internet Information Services 6.0
T? kha:
kbcgi kbhowto kbhowtomaster kbmt KB238788 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:238788

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