title: Unity WWW Class Method Post has errors on IIS7.5 with Coldfusion 9 on file upload
body: <p>Using Unity 4.0</p>
  
  <p>I am trying to use Unity to upload a file to my ColdFusion 9 Webserver on IIS 7.5</p>
  
  <p>IIS Returns error 500 with no explanation....</p>
  
  <p>I Turned on IIS Failed Request Tracing Rules. This let me see the Headers being sent to the server from Unity</p>
  
  <pre><code>Content-Length: 496473
  Content-Type: multipart/form-data; boundary="ZlJady3vWV8N5mlsvGGGJ3MEbxdsDabqkUtreBBK"
  Accept: */*
  Expect: 100-continue
  Host: www.test.com
  User-Agent: UnityPlayer/4.3.0f4 (http://unity3d.com)
  </code></pre>
  
  <p>This is in the section General Request Entity</p>
  
  <pre><code>--ZlJady3vWV8N5mlsvGGGJ3MEbxdsDabqkUtreBBK
  Content-Type: text/plain; charset="utf-8"
  Content-disposition: form-data; name="frameCount"
  
  35805
  --ZlJady3vWV8N5mlsvGGGJ3MEbxdsDabqkUtreBBK
  Content-Type: image/png
  Content-disposition: form-data; name="file"; filename="file.png"
  
  %89PNG
  %1A
  </code></pre>
  
  <p>This all looks fine to me so far....Then I get a bunch of 
  GENERAL_REQUEST_ENTITY  lines that contain the file data...
  Buffer %16%D9%E6%B0Ck#%E2%84I-/%EB%06%05%FB't that goes on and on</p>
  
  <p>Until the last one...
  Buffer 9%97%B7'%BE%D0%AB%09%C9%AD%88%D2 </p>
  
  <p>Then it calls the ColdFusion DLL with CALL_ISAPI_EXTENSION 
  C:\ColdFusion9\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll</p>
  
  <p>Then the error:
  MODULE_SET_RESPONSE_ERROR_STATUS 
  ModuleName IsapiModule 
  Notification 128 
  HttpStatus 500 
  HttpReason Internal Server Error 
  HttpSubStatus 0 
  ErrorCode 0 
  ConfigExceptionInfo<br>
  Notification EXECUTE_REQUEST_HANDLER 
  ErrorCode The operation completed successfully. (0x0) </p>
  
  <p>So something in ColdFusion is bombing....
  A trip through the ColdFusion logs find nothing related to the original request</p>
  
  <p>I tried posting the same thing to an older version of Coldfusion 6.1 and it produced this error:</p>
  
  <p>500 Corrupt form data: no leading boundary:  != --xnwss9NYfDunlkBN78LJhFHrlEDhqxHdKuXJxmjf</p>
  
  <p>Unity seems to generate the proper boundary values to IIS 7.5 that we could see above but I'm not sure....Is there supposed to be an ENDING Boundary that is not being sent?</p>
  
  <p>Unfortunately I can't see the actual data being sent by Unity or received by the server except in the IIS 7.5 failed request log.</p>
  
  <p>I see plenty of posts where people are uploading files to PHP without problems, </p>
  
  <p>Here is my Code:</p>
  
  <pre><code>WWWForm form = new WWWForm();
  form.AddField("frameCount", Time.frameCount.ToString());
  form.AddBinaryData ( "file", Image1.EncodeToPNG());
  //Hashtable myheaders = new Hashtable();    
  //myheaders.Add("enc-type", "multipart/form-data");
  WWW w = new WWW("http://www.test.com/AuctionImages.cfm",form);
  </code></pre>
  
  <p>It's basically just copied from examples that seem to work for other servers...
  I played with passing headers for enc-type but WWW is supposed to do that automatically according to the docs.</p>
  
  <p>I tried passing the mime type in the AddBinaryData method</p>
  
  <p>If I axe the AddBinaryData line it posts to the page just fine.</p>
  
  <p>Does anyone know a webpage tool I can set as my post URL that would spit out what it received from the post including headers?</p>
  
  <p>Has anyone had any similar problems with file uploads using Unity WWW Class?</p>
  
  <p>Thank you!
  Ryan</p>