Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to call a URL from server without showing it to client?
#1
Hello,

I'm trying to call a URL that have a security information from server (IW ISAPI) to another server directly without executing a JS or open a new window at the client.

I Tried IdHTTP, and winnet without success. Both gives unkown error when executed from IW form. Is there is a way to make this call directly from the user session, wait for the results, and then move on accordingly?

I'm using IW 14.2.7 with D XE5


Thx in advance...
Mohamed
Reply
#2
IdHTTP works fine from within a user session.

Please post concrete error messages. "without success" does not give us anything to go on.
Reply
#3
(11-09-2018, 03:37 PM)kudzu Wrote: IdHTTP works fine from within a user session.

Please post concrete error messages. "without success" does not give us anything to go on.

Hi,

I dont have clear exception to trace. When I try the code form the user session, I get an exception on IdHTT.GET procedure, it asks for the source of IWForm.pas, and when i press ignore it takes me to the CPU debug window, and after run/F9, it it runs the finally porting with null response...

Any idea what is going wrong here?


Attached Files Thumbnail(s)
       
Reply
#4
Use a try..except and catch the exception to see it. The reason its likely asking for IWForm.pas is that you have no exception handler, but IW has ones in case users dont catch them and that is likely what is triggering the IDE.
Reply
#5
(11-09-2018, 05:08 PM)kudzu Wrote: Use a try..except and catch the exception to see it. The reason its likely asking for IWForm.pas is that you have no exception handler, but IW has ones in case users dont catch them and that is likely what is triggering the IDE.

You are correct. The error is 'IOHandler value is not valid'

Any advise?

I think ifound the source of the problem. I'm using HTTPS, that requires IOHandles for the SSL/TLS to be assigned
Reply
#6
(11-09-2018, 05:54 PM)mhammady Wrote: You are correct. The error is 'IOHandler value is not valid'

That error means you are requesting an HTTPS url, but the TIdHTTP.IOHandler property has not been assigned a TIdSSLIOHandlerSocketBase-derived component, such as TIdSSLIOHandlerSocketOpenSSL.

Note: if you are using a fairly up-to-date version of Indy from the past few years, TIdHTTP will usually handle that internally for you.

(11-09-2018, 05:54 PM)mhammady Wrote: I think ifound the source of the problem. I'm using HTTPS, that requires IOHandles for the SSL/TLS to be assigned

Yes.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)