Cov txheej txheem:

Kuv yuav muab httpErrors nyob qhov twg hauv web config?
Kuv yuav muab httpErrors nyob qhov twg hauv web config?

Video: Kuv yuav muab httpErrors nyob qhov twg hauv web config?

Video: Kuv yuav muab httpErrors nyob qhov twg hauv web config?
Video: KOJ NYOB PUAS KAJ SIAB TUB TSWB Wwj( nkauj tawm tshiab )2023 2024, Plaub Hlis Ntuj
Anonim

Kev teeb tsa . Koj ua tau teeb tsa qhov < http yuam kev > yam nyob rau qib server hauv ApplicationHost. config cov ntaub ntawv thiab ntawm qhov chaw thiab daim ntawv thov qib hauv qhov tsim nyog Web . config ntaub ntawv.

Yog li ntawd, kuv yuav teeb tsa qhov kev cai 404 nplooj ntawv yuam kev 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."

Tsis tas li ntawd, kuv yuav teeb tsa customErrors hom li cas? Tsim ib < kev cai yuam kev > tag nyob rau hauv "web. config" configuration file nyob rau hauv lub hauv paus directory ntawm daim ntawv thov web tam sim no. Qhov no < kev cai yuam kev > tag yuav tsum muaj nws " hom "attribute teeb mus "Off". Thaum twg kev cai yuam kev yog teeb mus rau On lossis RemoteOnly, koj yuav tsum tau hais kom meej qhov defaultRedirect attribute.

Tom qab ntawd, lo lus nug yog, Kuv yuav ua li cas thiaj li tsis raug cai yuam kev hauv web config?

Txhawm rau lov tes taw kev cai yuam kev ua raws cov kauj ruam no:

  1. Tsim ib daim ntawv theej ntawm lub vev xaib.
  2. Qhib lub Web.
  3. Hauv Web.
  4. Teem lub customErrors hom kom tawm raws li hauv qab no:
  5. Txuag lub Web.
  6. Thaum koj khiav qhov kev thov teeb meem, ASP. NET tam sim no rov qab cov lus qhia ntxaws ntxaws uas piav qhia txog qhov tshwj xeeb ntawm qhov teeb meem.
  7. Reenable.

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: