Asp.net Validation of viewstate MAC failed

前端 未结 16 1623
猫巷女王i
猫巷女王i 2020-12-02 20:12

I am receiving the following error at certain times on asp.net website.

 Sys.WebForms.PageRequestManagerServerErrorException: 
 Validation of viewstate MAC f         


        
16条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 20:32

    I am not sure how this happened but I started to get this error in my internal submit form pages. So when ever I submit something I'm getting this error. But the problem is this website is almost working 5-6 years. I don't remember I made an important change.

    None of the solutions worked for me.

    I have setup a machine key with the Microsoft script and copied into my web.config

    I have executed asp.net regiis script.

    aspnet_regiis -ga "IIS APPPOOL\My App Pool"
    

    Also tried to add this code into the page:

    enableViewStateMac="false"
    

    still no luck.

    Any other idea to solve this issue?

    UPDATE:

    Finally I solved the issue. I had integrated my angular 4 component into my asp.net website. So I had added base href into my master page. So I removed that code and it is working fine now.

    
    

提交回复
热议问题