0 Replies Latest reply on Dec 17, 2008 4:43 AM by DongerNeedFood

    help with translating a .net webservice

      My config: CF 7, win 2003 server, IIS 6

      Not sure how to explain this and I'll probably use the wrong terms, but I need to get info from an ASP webservice, but I've only been given VB.net example code. Here's the example code:

      Dim WebClient As New System.Net.WebClient

      WebClient.Credentials = New System.Net.NetworkCredential(ChallengeUserName, ChallengePassword)

      Dim ReturnXml As String = WebClient.UploadString(" http://xxx.xxx.xxx.xxx:2235/Data.ASP", SendPacket.ToString)

      That's easy enough...I think. So, here's my cfhttp call:

      <cfhttp username="xx" password="xxx" url=" http://xxx.xxx.xxx.xxx:2235/data.asp" method="post" useragent="#cgi.HTTP_USER_AGENT#" result="xxx" redirect="Yes">

      <cfhttpparam type="Header" name="charset" value="utf-8" />

      <cfhttpparam type="file" mimetype="text/xml" file="#thefile#" name="SendPacket" encoded="no" />


      The response I get is: "Connection Failure". ErrorDetail is: "I/O Exception: Premature EOF encountered"

      Through some googling, I found someone who had problems with IIS compression and changed their cfhttpparam header for Accept-Encoding....but that didn't help or change the response.

      Is the error "Premature EOF encountered" saying there's a problem on my side or in the response I'm getting from the webservice?

      If I browse straight to the URL, I get NOTHING. It doesn't ask for a user/pass...just get a blank page (no html).

      Any help would be appreciated.