Localhost not found when setting target URL

Hi,

I have a very strange situation.

In my client app I set the Channel.TargetUrl to a vlaue stored in an ini file.

At design time the value is set to http://127.0.0.1 port 8099.
now, in the INI file I set it to the same value.

Now after setting the value I get a Host not found error. WHen I check the before/after values in the debugger, they seem to be identical. What could be the cause of this?

Thanks,

Hi,

try to set TargetURL property instead. it should be like http://127.0.0.1:8099/bin

Hi,

Sorry don’t undertstand the answer. It is the Channel.TargetURL property I am setting to exaclty that. Or do you mean something else?

Hi,

Sorry, I’ve misread your question.
I thought you set Channel.Host and Channel.Port

Can you create a simple testcase that reproduces this issue, pls?

To reproduce the issue will be hard. I just copied the same code form another project that works. Any suggestions?

you could do something wrongly.
w/o code snippet I can’t say what was wrong …

Hi,

It will take me a lot of work to try to isolate the problem…

I stepped into the RO code until the SendData in ROWinInetHTTPProblem. The URLs are identical:

Doesnt work:
image

Works
image

Remember that for this problem I only comment out the following line:

    //Channel.TargetUrl := FTargetURL;

Which will enable the same URL but then set at design time. There is no other difference.

Thanks,

Hi,

Can you update my testcase for reproducing this issue, pls?
23631.zip (93.6 KB)