Can this be used with Visual Studio 2010

Aug 31, 2010 at 9:23 AM

Since I'm using Visual Studio 2010, this is the question:

how can I make this work for 2010? (Still using SharePoint 2007)

Kind Regards

Aug 31, 2010 at 11:52 PM

Should just be a matter of importing the project and code to VS2010 and rebuilding.  I'll see if I have some time this week to give that a try and upload a VS2010 version.

Sep 1, 2010 at 8:01 AM

That would be great.
At this moment I have a VS 2010 test rig set up (that we're using for regular load tests), but now people like to include some infopath forms in the test scenarios.
It would be a shame this wouldn't be possible with VS2010.

I could try importing and rebuilding myself (and will do), but since I'm not a programmer and thus lack experience with Visual Studio (except for load testing) there is a possibility I screw things up :-).


Sep 1, 2010 at 9:39 AM

Small update:

I've tried to rebuild it myself. When I run the webtest with the ExtractAndSubstituteDynamicInfoPathData web plugin added to the webtest, I get this error:

Request failed: Exception in PreWebTest event: Unable to cast object of type 'InfoPathExtractionRules.ExtractAndSubstituteDynamicInfoPathData' to type 'Microsoft.VisualStudio.TestTools.WebTesting.WebTestPlugin'.

at Microsoft.VisualStudio.TestTools.WebTesting.WebTestPluginReference.CreateInstance()
at Microsoft.VisualStudio.TestTools.WebTesting.DeclarativeWebTest.OnPreWebTest(PreWebTestEventArgs e)
at Microsoft.VisualStudio.TestTools.WebStress.WebTestCaseVariation.Start()

Kind Regards

Sep 1, 2010 at 11:05 PM

Thanks for giving it a try yourself, Tom.  I had to make a couple minor tweaks moving to 2008, so it's likely something similar.  I just setup a virtual machine where I can install VS 2010.  I'll import the project and try to get the plugin working, then upload that version to this site.  I'll try to get that done before the end of the week.

Sep 2, 2010 at 8:22 PM

OK, I just uploaded a dll that should work with VS2010, which you can download from:  All I had to do was build the project against the .NET Framework 4 and reference the new web testing libraries.  Didn't have to change any code.  Let me know if you have any problems.

Sep 3, 2010 at 2:42 PM

Thanks a lot,

this time the form is running, at least when I manually alter the web test by adding the extraction rules and adjust the postback.formserver requests' String Body.

But what happens now, is that no form is submitted.
When I run the webtest in visual studio 2010, I get on the responses for the postback.formserver requests this:

There has been an error while loading the form. The security validation for this form is invalid.

And so I think this is screwing things up.


Sep 3, 2010 at 7:34 PM

That's usually the error you get without using the plugin from this project.  Can you double check that you have added the ExtractAndSubstituteDynamicInfoPathData plugin to that webtest?  If you do have it, something easy to try is to remove it and readd it.

Alternatively, this could mean that the plugin is not identifiying the InfoPath requests.  Is the InfoPath form in a document library (the URL should end in /_layouts/FormServer.aspx)?  If so, you should leave the InvocationPath parameter of the plugin blank.  Or is your InfoPath form being hosted in a XmlFormViewControl?  If so, you should specify an InvocationPath parameter which is a substring of that URL.

Sep 6, 2010 at 8:30 AM

So, when I manually add the extraction rules, described here:
I get the errors described in my previous post.

When I just add the Web Test Plug-in, then I get this on every postback.formserver:

"Request failed: There is no context parameter with the name 'CurrentFormData' in the WebTestContext"

The URL is ending on /_layouts/FormServer.aspx, so I've left the InvocationPath parameter blank.

Sep 7, 2010 at 8:31 PM

When you use the ExtractAndSubstituteDynamicInfoPathData plugin, you should not need to add make manual modifications to the requests.  Can you try rerecording a webtest, then adding only the ExtractAndSubstituteDynamicInfoPathData plugin?

Sep 7, 2010 at 9:32 PM

That's what I did in the last case. (So I never did manual modifications to the requests, together with adding the plugin).
I also rerecorded the test, to make sure I started clean.

So, when only adding the plugin, I get following error:
"Request failed: There is no context parameter with the name 'CurrentFormData' in the WebTestContext"


Sep 7, 2010 at 11:19 PM

Hmm, I'm going to need more information to debug this problem.  Can you send me a copy of the webtest?  A fiddler session of the requests and responses could also be helpful.

Sep 8, 2010 at 11:33 AM

You've got an email address I can send the webtest?

Sep 8, 2010 at 3:01 PM
Edited Sep 8, 2010 at 4:07 PM


Since I'm pretty sure you've done a good job with this, I've tested with a very simple form.
1 inputfield + submit button. (Thus containing 1 postback.formserver)

Both VS 2008 (I've installed VS 2008 to compare results) and VS 2010 plugins are doing their job and I can load test the form.

When trying to load test our initial form, I get the
"Request failed: There is no context parameter with the name 'CurrentFormData' in the WebTestContext"

Quite annoying :-)

Sep 9, 2010 at 3:59 PM


the new version solved everything :-)

Thanks a lot

Sep 14, 2010 at 6:47 PM

Update for anyone else who comes across this thread.  A recent patch (probably Service Pack 2) added some items to the InfoPath eventlog which moved the index of the canary.  This issue is fixed in the recent release of the tool.

Mar 29, 2011 at 8:34 PM

Thank you very much. The new DLL from Sep 14 works like a charm.

It is in fact a problem with SP2. Not the first release of SP2, but a later hotfix. In my case, it occurs after SharePoint 2007 Version 12.0000.6545.5001. This is the August 31, 2010 Cumulative Update.