1

I'm making with VS2015, WPF and C# a test application in which we can test and debug an ASP.Net web service application.

Both projects belong to the same solution.

Because some methods in the webservice would normaly called by an URL including some parameters i had to create the HttpRequest programatically before calling such methods.

In one of these cases it is necessary to add files to the request.

Fortunately i have found in this forum the following thread:

How to create a file to populate HttpContext.Current.Request.Files?

The version from StuartLC seemed to be very practical but i have a little problem with the calling of InvokeMethod. The objects which use InvokeMethod (types object and HttpFileCollection) do normally not have that method.

Have i forgotten some references or assemblies in my test project?

Patrick Pirzer
  • 1,649
  • 3
  • 22
  • 49
  • The example is using extension methods which you can find in the bottom of the example if you scroll down a bit. You may need to build the assembly first before actually making the calls. – Lennart Stoop Apr 12 '18 at 13:36
  • Thank You Lennart. I should have scroll down and take a look at the rest of the code. What a pity! – Patrick Pirzer Apr 12 '18 at 14:11

0 Answers0