Cov txheej txheem:

Kuv yuav tsim ib nplooj ntawv yuam kev hauv IIS li cas?
Kuv yuav tsim ib nplooj ntawv yuam kev hauv IIS li cas?

Video: Kuv yuav tsim ib nplooj ntawv yuam kev hauv IIS li cas?

Video: Kuv yuav tsim ib nplooj ntawv yuam kev hauv IIS li cas?
Video: ET Yaj & Sua Ham - Kev Hlub Txiav Tsis Tau 2024, Kaum ib hlis
Anonim

Yuav ua li cas ntxiv ib nplooj ntawv yuam kev

  1. Qhib Internet Kev Pabcuam Xov Xwm ( IIS ) Manager:
  2. Hauv Kev Sib Txuas pane, nthuav cov npe neeg rau zaub mov, nthuav Cov Chaw, thiab tom qab ntawd mus rau lub vev xaib qhov chaw los yog daim ntawv thov uas koj xav tau los kho cov nplooj ntawv yuam kev rau.
  3. Hauv Tsev pane, ob npaug nias Nplooj ntawv yuam kev .
  4. Hauv Qhov Kev Ua Haujlwm pane, nyem Ntxiv

Yog li ntawd, kuv yuav teeb tsa qhov kev cai 404 yuam kev nplooj ntawv hauv Microsoft IIS li cas?

Mus rau "Kev Sib Txuas" pane thiab nyem lub cim ntxiv (+) nyob ib sab ntawm koj server npe kom nthuav nws. Tom qab ntawd nthuav "Sites." Tom ntej no, mus rau qhov chaw lossis daim ntawv thov koj xav tau teem ib nplooj ntawv yuam kev rau. Kauj ruam 3: Qhib Nplooj ntawv yuam kev . Double-click lub " Nplooj ntawv yuam kev ” icon nyob rau hauv lub tsev pane; nyem "Edit."

Kuj Paub, yuav ua li cas thiaj tsim tau nplooj ntawv yuam kev hauv ASP NET MVC? Custom Error Page hauv ASP. NET MVC

  1. Ua ntej ntxiv Error.cshtml nplooj ntawv (Saib nplooj ntawv) rau hauv Shared Folder yog tias nws tsis tau muaj lawm.
  2. Ntxiv lossis hloov kho cov ntaub ntawv Web.config thiab teeb tsa qhov Kev Cai yuam kev rau On.
  3. Ntxiv ib qho Kev Tswj Xyuas Kev Ua Haujlwm tshwj xeeb thiab saib rau kev qhia HTTP Status Code.
  4. Ntxiv ib qho [HandleError] tus cwj pwm rau Txoj Kev Npaj Ua Haujlwm.

Kuj kom paub, Kuv yuav ua li cas kaw cov kev cai yuam kev hauv IIS?

Nyem rau "Edit Configuration". Nyem qhov Kev cai yuam kev tab. Xaiv Off rau kev cai yuam kev hom. Los yog mus rau hauv daim nplaub tshev uas muaj koj daim ntawv thov thiab qhib cov ntaub ntawv web.config hauv cov ntawv nyeem thiab hloov kho los ntawm txhais tes, thiab hloov cov ntawv. kev cai yuam kev tag rau < kev cai yuam kev mode="Off" />.

Cov cwj pwm twg ntawm cov kev cai yuam kev raug siv los teeb tsa nplooj ntawv yuam kev URL?

config muaj ob yam ntxwv uas cuam tshuam dab tsi nplooj ntawv yuam kev yog qhia: defaultRedirect thiab hom. Lub defaultRedirect tus cwj pwm yog xaiv tau. Yog hais tias muab, nws qhia cov URL ntawm nplooj ntawv yuam kev thiab qhia tias cov nplooj ntawv yuam kev yuav tsum tau qhia es tsis txhob Runtime yuam kev YSOD.

Pom zoo: