viewStateEncryptionMode = QUOT;总是"不加密 [英] viewStateEncryptionMode="Always" not encrypting

查看:385
本文介绍了viewStateEncryptionMode = QUOT;总是"不加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些安全问题,我需要启用View State Encryption。我有viewstate& viewstateMAC已关闭,但我需要加密控制状态字符串,其中包含在__VIEWSTATE表单参数中。

Due to some security concerns i need to enable View State Encryption. I have viewstate & viewstateMAC turned off but i need to encrypt the "control state" string that is included in the __VIEWSTATE form parameter.

目前我的web.config看起来像:

Currently my web.config looks like:

    <pages enableViewState="false" enableViewStateMac="false">

当我设置以下内容时,在cassini中,我的viewstate被加密:

When i set the following, in cassini, my viewstate is encrypted:

    <pages enableViewState="false" enableViewStateMac="false" viewStateEncryptionMode="Always">

当我在IIS 6服务器上进行相同的更改时,没有任何反应。

When i make the same change on my IIS 6 server, nothing happens.

我看到位于'C:...'的应用程序域回收(事件:应用程序'/ LM / W3SVC / ...' 。')。当我触摸web.config,但我没有像cassini那样得到加密的viewstate。我已经尝试了站点停止/启动,IIS重置停止/启动,清除ASP.NET临时文件缓存。任何人有什么建议需要做什么来配置这个?

I see the app domain recycle(Event: Application '/LM/W3SVC/...' located in 'C:...' initialized for domain '...'). when i touch web.config but i do not get encrypted viewstate as with cassini. I have tried Site Stop/Start, IIS Reset Stop/Start, Clear ASP.NET Temporary file cache. Anyone have any suggestions on what needs to be done to configure this?

推荐答案

我遇到了一个类似的问题,它归结于如下事实:如果你预先编译你的网站的网页.net页面的.config节点被忽略。您必须在编译时设置这些设置以使其正常工作。我知道这是年底,但是我想,如果有人来这里寻找解决问题这可能是有用的信息。

I ran into a similar problem with this and it came down to the fact that if you pre-compile your site the web.config node for pages is ignored. You have to set those settings at compile to get it working. I know this is year late, but I figure if someone else comes here looking for solution to the problem this might be useful information.

有一点关于这个: http://blogs.msdn.com/b/asiatech/archive/2011/07/19/pages-settings-don-t-work-for-pre-compiled-asp-net-applications.aspx

这篇关于viewStateEncryptionMode = QUOT;总是&QUOT;不加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆