If I set content-length here, then the stream I'm calling Length() on is not the one embedded in the request. When I then execute the test harness, we end up with the below.

What's the best way to set content-length so I can talk to the harness running on a current windows box?


2013-05-17 14:55:08.539 ETH.CommandLine.Output {
	Result: Fail,
	Message: "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.ProtocolViolationException: You must provide a request body if you set ContentLength>0 or SendChunked==true.  Do this by calling [
		Begin
	]GetRequestStream before [
		Begin
	]GetResponse.
   at System.Net.HttpWebRequest.GetResponse()
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[
		T0,
		TRet
	](CallSite site,
	 T0 arg0)
   at ActLike_IHttpWebRequest_7ca53802a8484cff881cd7475eec1ec0.GetResponse()
   at ETH.Http.Client.HttpWebRequestWrapper.GetResponse() in c: \Users\David O'Flynn\Documents\GitHub\edais\ETH\Http\Client.cs:line 112
   at ETH.Http.Client.Send(Action`1 modifyRequest) in c:\Users\David O'Flynn\Documents\GitHub\edais\ETH\Http\Client.cs:line 80
   at ETH.Http.Client.Send(Message message) in c:\Users\David O'Flynn\Documents\GitHub\edais\ETH\Http\Client.cs:line 49
   at ETH.Http.Client.Send(String action,
	 Object data) in c: \Users\David O'Flynn\Documents\GitHub\edais\ETH\Http\Client.cs:line 61
   at ETH.Scenarios.ProposeCreateApplication.Send(String applicationNumber,
	 String certifierEmail) in c: \Users\David O'Flynn\Documents\GitHub\edais\ETH\Scenarios\ProposeCreateApplication.cs:line 75
   at ETH.Scenarios.EHC_EndToEnd.ToThirdParty_Accept(String applicationNumber,
	 String certifierEmail) in c: \Users\David O'Flynn\Documents\GitHub\edais\ETH\Scenarios\EHC_EndToEnd.cs:line 13
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target,
	 Object[
		
	] arguments,
	 Signature sig,
	 Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
	 Object[
		
	] parameters,
	 Object[
		
	] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
	 BindingFlags invokeAttr,
	 Binder binder,
	 Object[
		
	] parameters,
	 CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj,
	 Object[
		
	] parameters)
   at ETH.ScenarioRunner.Runner.Run(String testRunId,
	 String scenarioId,
	 String[
		
	] scenarioArguments) in c: \Users\David O'Flynn\Documents\GitHub\edais\ETH\ScenarioRunner\Runner.cs:line 40
   at ETH.CommandLine.Program.Run(Options options) in c:\Users\David O'Flynn\Documents\GitHub\edais\ETH\CommandLine\Program.cs:line 95"
}