ViewState generator yog dab tsi?
ViewState generator yog dab tsi?

Video: ViewState generator yog dab tsi?

Video: ViewState generator yog dab tsi?
Video: Russ Cam® Unplugged: Unit Testing ASP.Net MVC 2024, Tej zaum
Anonim

Taw qhia: Saib Xeev Ntsiab Lub tshuab hluav taws xob

Cov cai no yuav tsim cov yuam sij tshiab uas koj tuaj yeem tso rau hauv koj lub vev xaib. config kom cov kev tsis sib haum xeeb raug tshem tawm. Txhua tus lej suav nrog siv tus lej random lub tshuab hluav taws xob raws li lub sijhawm kom tsis txhob muaj kev tsis sib haum xeeb yav tom ntej.

Xav txog qhov no, ViewState yog dab tsi?

ViewState yog ib qho tseem ceeb ntawm cov neeg siv khoom hauv xeev cov txheej txheem kev tswj hwm. ViewState yog siv los khaws cov neeg siv cov ntaub ntawv ntawm nplooj ntawv thaum lub sijhawm xa rov qab ntawm nplooj ntawv web. ViewState tsis tuav cov tswj, nws tuav qhov tseem ceeb ntawm kev tswj. Nws tsis rov qab tus nqi los tswj tom qab nplooj ntawv rov qab.

Tsis tas li ntawd, ViewState cov ntaub ntawv khaws cia nyob qhov twg? Saib cov ntaub ntawv hauv xeev yog khaws cia nyob rau hauv tus neeg sab nrauv (Webpage) nyob rau hauv daim ntawv ntawm ib tug zais tswj (HTML zais teb) lub npe "_VIEWSTATE" thiab Saib State Data yog khaws cia hauv Base64 String encoded hom ntawv uas tuaj yeem txiav txim siab ntxiv.

Xav txog qhov no, ViewState parameter yog dab tsi?

Cov ViewState parameter yog base64 serialized parameter uas ib txwm xa los ntawm qhov zais parameter npe _ SAIB nrog POST thov. Qhov no parameter yog deserialised ntawm tus neeg rau zaub mov-sab los muab cov ntaub ntawv. Nws yog ib txwm ua tau los khiav code ntawm lub web server qhov twg siv tau ViewState tau forged.

Vim li cas ViewState tsis siv hauv MVC?

ASP. NET MVC ua tsis siv ViewState nyob rau hauv qhov kev txiav txim ib txwm (uas khaws cov txiaj ntsig ntawm kev tswj hwm hauv nplooj ntawv web). ASP. NET MVC yuav txuas ntxiv qhov tseem ceeb ntawm cov kev tswj kom ntev txaus rau koj kom siv tau lawv thiab (yog tias xav tau) mus ncig lawv rov qab mus rau koj nplooj ntawv rau kev kho lossis kho.

Pom zoo: