验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载..... ???

chkmouse 2009-04-01 06:10:17
“/UI”应用程序中的服务器错误。
--------------------------------------------------------------------------------

验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配置指定了相同的 validationKey 和验证算法。不能在群集中使用 AutoGenerate。




Master.Master 模板页
Index.aspx 继承模板页
Search.aspx 也继承模板也


从Index.aspx PostBackUrl跳转到Search.aspx ,一到Search.aspx就出现这个错误

“/UI”应用程序中的服务器错误。
--------------------------------------------------------------------------------

验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配置指定了相同的 validationKey 和验证算法。不能在群集中使用 AutoGenerate。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Web.HttpException: 验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配置指定了相同的 validationKey 和验证算法。不能在群集中使用 AutoGenerate。

源错误:


[没有相关的源行]


源文件: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ui\8ab2e3bc\ed11bc6c\App_Web_ptsrvhqy.6.cs 行: 0
...全文
5758 32 打赏 收藏 转发到动态 举报
写回复
用AI写文章
32 条回复
切换为时间正序
请发表友善的回复…
发表回复
feixufengxiang 2012-02-16
  • 打赏
  • 举报
回复
我的更奇怪。部署到服务器后,有的用户可以使用,但是个别用户就会出现这个问题。到底为什么呢?
hh_feng 2010-11-15
  • 打赏
  • 举报
回复
错误原因是:母版里的 LinkBotton 是运行在服务器上的~
修改一下就好了: <a href="../wangye/youjian.aspx">返回首页</a>
这样就好了
xcjwxx 2010-09-27
  • 打赏
  • 举报
回复
你是用asp.net mvc开发的吧?你的问题应该是 提交按钮使用了<input type="image"/>,image按钮在mvc里会有点问题,你应该在image执行提交的js后跟上return false;
window.location.href = "../Search/Search?q=" + encodeURIComponent($(this).prev().val());
return false;
xuzm66 2010-09-25
  • 打赏
  • 举报
回复
[Quote=引用 28 楼 mouth_ly 的回复:]
这个问题我暂时解决了 方法是在两个页面都加 EnableViewStateMac="false" 不知道 各位仁兄滴是不是能解决
[/Quote]


哈哈,谢谢,这个可以行
BigMouth• 2010-09-20
  • 打赏
  • 举报
回复
这个问题我暂时解决了 方法是在两个页面都加 EnableViewStateMac="false" 不知道 各位仁兄滴是不是能解决
deyiStruket 2010-09-13
  • 打赏
  • 举报
回复
顶顶 也正要问这个
LYC403 2010-09-06
  • 打赏
  • 举报
回复
我也是啊
tianshenglong 2010-08-21
  • 打赏
  • 举报
回复
我也遇到这个问题了,我是在集成支付宝接口时遇到的,一点支付宝结算就报这个错了 ,如果您解决了这个问题 麻烦您告诉一下我解决的办法,谢谢,我的邮箱是 tianshenglongchang@126.com
xiaobendan_528 2010-08-17
  • 打赏
  • 举报
回复
我也遇到了 不晓得怎么解决 关注中...
shilly1101 2010-07-22
  • 打赏
  • 举报
回复
改web.config有个鬼用啊?
<% page language="C#" EnableViewStateMac="false" %>也没用!!
发哥 2010-07-06
  • 打赏
  • 举报
回复
如果是逐浪CMS,将进程池中用户,使用预定义帐户读取就能解决问题,更多访问www.zoomla.cn/help
Eagle8609 2010-05-11
  • 打赏
  • 举报
回复
我也遇到了,顶
allen0118 2010-05-07
  • 打赏
  • 举报
回复
我也遇见同样的问题了,顶
wptad 2009-05-08
  • 打赏
  • 举报
回复
<pages enableViewStateMac="false"></pages>
xuancheng999 2009-04-07
  • 打赏
  • 举报
回复
配置一下 WEB.CONFIG 就好


<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<system.web>
<customErrors mode="Off"/>
<pages validateRequest="false" enableViewState="true">

<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>


</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
<machineKey validationKey="3FF1E929BC0534950B0920A7B59FA698BD02DFE8" decryptionKey="280450BB36319B474C996B506A95AEDF9B51211B1D2B7A77" decryption="3DES" validation="SHA1"/>
</system.web>
<system.web.extensions>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
-->
<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
writeAccessProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2" />
-->
</webServices>
<!--
<scriptResourceHandler enableCompression="true" enableCaching="true" />
-->
</scripting>
</system.web.extensions>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</handlers>
</system.webServer>

</configuration>
Ablan_Wang 2009-04-07
  • 打赏
  • 举报
回复
ding
Software 2009-04-03
  • 打赏
  • 举报
回复
关注
Software 2009-04-03
  • 打赏
  • 举报
回复
up
chkmouse1 2009-04-01
  • 打赏
  • 举报
回复
顶顶
chkmouse1 2009-04-01
  • 打赏
  • 举报
回复
顶顶
加载更多回复(4)

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧