脚本在一台机器上创建和另一台机器上运行 [英] Script created on one machine and run on another machine

查看:341
本文介绍了脚本在一台机器上创建和另一台机器上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以我的机器上创建应用程序服务器的脚本,现在我想运行其他机器上的这个脚本,但是当我运行此脚本,我得到以下错误:

I have created a script for application server by using my machine and now i want to run this script on other machine, but when i am running this script, i'm getting following error:

视图状态MAC验证失败。如果该应用程序是由一个承载
  Web场或群集,确保配置指定
  同样的validationKey和验证算法。自动生成不能
  在集群中使用。

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

我如何使用该脚本或者我应该在该机器上创建一个脚本?

How can i use this script or should i create another script on that machine?

感谢。

推荐答案

您想测试ASP.NET应用程序?

Are you trying to test ASP.NET app?

如果是的话那么假设你没有正确处理VIEWSTATE在测试:你需要在你的请求相关联的VIEWSTATE让你发送正确的值回服务器搜索

If yes then suppose you are incorrectly handling VIEWSTATE in your test: you need to correlate the VIEWSTATE in your request so that you're sending the correct value back to the server.

录制和回放的做法是行不通的位置:如果你只是想使用记录在脚本中的值,那么你很可能会遇到问题。你需要做的是获得来自服务器的previous响应VIEWSTATE的价值,剥离出来,连接code,然后寄回。

Record and replay approach will not work here: if you're just trying to use the value recorded in the script then you're likely to run into problems. What you need to do is get the value of VIEWSTATE from the previous response from the server, strip it out, encode it and then send it back.

我可以看看的链接和如何渡号:<一href=\"http://stackoverflow.com/a/10650186/993246\">http://stackoverflow.com/a/10650186/993246.

I can look into for number of links and how-tos: http://stackoverflow.com/a/10650186/993246.

这篇关于脚本在一台机器上创建和另一台机器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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