我正在寻找此问题的解决方案:
在运行自动网络测试时,我收到一个失败的请求,这是我找到的响应:
请求失败:在测试上下文中找不到上下文参数“$HIDDEN1.__EVENTVALIDATION”
我弄清楚隐藏字段应该从哪个请求中提取(在之前的请求中),其中(Hidden1)我在之前请求的提取规则中找到它,并且上下文参数名称的提取规则的值为1。
注意:我这次使用的是静态参数,HTTP状态是200。
在网上搜索后发现:http://blogs .msdn.com/b/slumley/archive/2007/04/10/how-to-debug-a-web-test.aspx 我未能在其中找到解决方案。
这个问题似乎很复杂,因为我已经保留了两天而没有任何答案!如果有人想了解更多信息,我 24/24 在线:) 非常感谢...
I'am looking for a solution to this problem :
While running my automatic web test I received a request failed and here you are the response I found :
Request failed: Context parameter '$HIDDEN1.__EVENTVALIDATION' not found in test context
I figured out which request the hidden field was suppose to be extracted from (In the request before), where the (Hidden1) I found it in the extraction rule of the before request and the extraction rule’s value for Context Parameter Name is 1.
Note: I am using a statics parameters for this time, and the HTTP state is 200.
After searching on the internet i found : http://blogs.msdn.com/b/slumley/archive/2007/04/10/how-to-debug-a-web-test.aspx where I failed to find my solution in it.
This question seems to be complicated cause i kept it since 2 days without having any answer ! If anybody wants to know more information, I am online 24/24 :) Thanks alot...
发布评论
评论(4)
我遇到了与您遇到的类似问题(我发现这个问题很老了,但我想我会发布一个解决方案,因为这是谷歌针对此问题的第一个结果)。
问题在于 __EventValidation 标记是浏览器最后呈现的内容之一,并且 VisualStudio 2008 Web 测试会在响应对象超过一定长度(我认为限制为 1.5MB)时截断响应对象。
您有三个选择:
希望能帮助任何面临类似问题的人。
~丹
I had a similar problem to what you were experiencing (I see that this question is very old, but I thought I would post a solution as this is the first result in google for this issue).
The problem is that the __EventValidation tag is one of the last things rendered by the browser and that VisualStudio 2008 web tests truncate the response object when it is over a certain length (I think the limit is 1.5MB).
You have three options:
Hope that helps anyone facing similar issues.
~Dan
我遇到了类似的问题并且仍在解决它们。同时,此链接也可能有所帮助:
http://blogs.msdn.com/b/slumley/archive/2007/04/10/how-to-debug-a-web-test.aspx
I'm running into similar issues and still working through them. In the meantime, this link may be of help as well:
http://blogs.msdn.com/b/slumley/archive/2007/04/10/how-to-debug-a-web-test.aspx
解决方案是将所有 EnableEventValidation 属性更改为 true(这是默认值)。
但我的开放中最好的解决方案是使用Visualstudio 2010的VSTS,它比2008年的要好,两者之间确实发生了很大的演变。
The solution is to change all the EnableEventValidation attribute to true (which is the default value).
But the best solution in my openion is to use the VSTS of visualstudio 2010 , it is better than the that of 2008, really a big evolution happened between both of them.
如果有人遇到这个问题并选择重写 Render 方法,这里有一个示例代码。
In case if someone would face this problem and choose to override Render method, here is a sample code.