login about faq

I am sending the contents of a file over to a third party, I load in the file and verify that I have carriage returns in the right place. I am able to set the form parameter, and call the page that is going to receive the data and parse on the carriagge returns. However, on the receiving form when I pull the contents out, it doesn't see the carriage returns and therefore doesnt do the parsing.

Here is my code

        Dim https As New Chilkat.Http()
        'Set the licence key for the chilkat component
        Dim success As Boolean = https.UnlockComponent("lickey")
dim domain as string = "www.somesite.com"
            With https
                'Traverse through hl7 messages
                For Each fl In files
                    'Send over the file to the processor page on client side
                    Dim req As New Chilkat.HttpRequest
                    Dim postvalue() As String
                    'req.UseUpload()
                    req.Path = "/mytest.aspx" 'mytest only

postvalue = IO.File.ReadAllLines(fl.FullName)
                    Dim postsent As String
                    For Each s As String In postvalue
                        postsent &= s & " " & vbCr

Next
                    postsent = postsent

req.UsePost()
                    req.AddParam("payload", postsent)
                    ''Bloody success
                    Dim resp As Chilkat.HttpResponse
                    resp = https.SynchronousRequest(domain, 80, False, req)
                    If resp Is Nothing Then
                        strErr &= vbNewLine & https.LastErrorText & " [" & fl.FullName & "]"
                        blnReturn = False
                        Exit For
                    Else
                        resp = Nothing
                        req = Nothing
                        'Move files to archive folder
                        If IO.File.Exists(fl.FullName.Replace("transfer", "archive\mydata\")) Then
                            fl.Delete()
                        Else
                            fl.MoveTo(fl.FullName.Replace("transfer", "archive\mydata\"))
                        End If
                    End If
                Next
            End With

Everything is working correctly code wise, but once the destination receives the content of the file, the carriage returns are dropped. Any help you can give on this would be appreciated. Thanks.

asked Jan 18 at 18:33

irishmaninusa's gravatar image

irishmaninusa
1

edited Jan 18 at 18:47

jpbro's gravatar image

jpbro ♦
1.1k2618


This was fixed...

link

answered Jan 20 at 19:06

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

To understand the problem better, post the contents of the LastErrorText property for the call to SynchronousRequest. It would be best if the http.VerboseLogging property is set to True beforehand.

Also, set the http.SessionLogFilename property to log the exact HTTP request and response to a file. Then post the contents of the session log.

link

answered Jan 19 at 08:52

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

I cannot do that due to the fact that destination is a secure location that takes in phi information and can't put that information in a forum. Regardless of how secure it is or prviate it is. Sorry.

(Jan 19 at 08:58) irishmaninusa

No error is returned, the post goes through without any issues, just loses the bloody carriage returns on the other side.

(Jan 19 at 08:59) irishmaninusa

And if I go away from using chilkat and use the httpwebrequest which is native .net, it works grand with http, but fails to even send with https.

(Jan 19 at 09:01) irishmaninusa

Send the info in private email...

(Jan 19 at 09:06) chilkat ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×186
×35

Asked: Jan 18 at 18:33

Seen: 651 times

Last updated: Jan 20 at 19:06

powered by OSQA