Jump to content

How can I get my URL.?


AMIT

Recommended Posts

Is there any method that I can get the Server URL? For example, my site url is 'http://Localhost:8077', I need to know if there is a method that return result to me as 'http://Localhost:8077'; Thank in advance.

Link to comment
Share on other sites

Hi AMIT

 

Use :

UniApplication.UniSession.URLPath

 

 

Best Regards

 

Thank you. By the way, I try to use per your suggestion but I get empty string instead.

 

var 
 URLRef: string;
begin
 .
 .
 URLref:=uniApplication.UniSession.URLPath+'MYPDF.PDF';
 uniLabel1.Caption:='<a href="'+URLRef+'" target=_blank>'+URLRef+'</a>';

Link to comment
Share on other sites

I wonder while debugging the the URLRef is Empty. But on the browser the UniLabel1.Caption display 'MYPDF.PDF'. when I position mouse pointer on unilabel, the correct link ('http://localhost:8077/MYPDF.PDF') shown on the status bar. If I click on the link new window open and show MYPDF.PDF correctly. I don't understand while debugging the URLRef is empty. Anybody can tell me why? Thank in advance.

Link to comment
Share on other sites

  • 7 years later...

I'm trying to get the url of my application.
I use ISAPI and it works well in this way,

MyURL := UniSession.Host + UniApplication.UniSession.URLPath;

But my network administrator assigned me a different port, to the public ip.
Please look at the graph, would there be a way to get the final URL?

schema network.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...