开发者

validation of viewstate mac failed Exception

I have a question and i searched on stack-over flow and found some answer but none of it works for me ,i have a web application it works on the local host but when i host it online it gives me and error that :

<customErrors mode="Off" >

must be off i made that then i gone to use my application it gives me the following one :

Validation of v开发者_如何学Ciewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

any help will be great ,thanks


You lose security benefits by doing this, but the quickest solution would be to set enableViewStateMac="false" in the web.config.

<pages enableViewStateMac="false" ...>

This can sometimes happen if your ViewState is very large, and you postback before the page has finished loading. If you're using ViewState as a data repository, that's probably why this happens. I would also inspect your markup and make sure that you don't have any unclosed <script> tags.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜