Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: ReferringURL or how to get the URL of the host-page (Serial 201631920)


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 10 - Last Post: Apr 16, 2017 5:04 PM Last Post By: Alexandre Machado
Soren Hartig

Posts: 13
Registered: 7/17/04
ReferringURL or how to get the URL of the host-page (Serial 201631920)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2016 4:25 AM
In short, when I read the string "UserSession.WebApplication.ReferringURL" I get the url of my running project (standalone or ISAPI) address. I was hoping to get the address of the host. My IntraWeb page is hosted inside an iframe in a web page.
But if that is the wrong way to do it, how can I do it otherwise.
regards

Edited by: Soren Hartig on Dec 21, 2016 4:27 AM
Soren Hartig

Posts: 13
Registered: 7/17/04
Re: ReferringURL or how to get the URL of the host-page  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 3, 2017 8:10 AM   in response to: Soren Hartig in response to: Soren Hartig
(bump)
Eitan Arbel

Posts: 508
Registered: 2/24/13
Re: ReferringURL or how to get the URL of the host-page  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 3, 2017 10:16 AM   in response to: Soren Hartig in response to: Soren Hartig
In short, when I read the string "UserSession.WebApplication.ReferringURL" I get the url of my running project (standalone or ISAPI) address. I was hoping to get the address of the host. My IntraWeb page is hosted inside an iframe in a web page.

what if you remove the UserSession and just use WebApplication.ReferringURL ?
Soren Hartig

Posts: 13
Registered: 7/17/04
Re: ReferringURL or how to get the URL of the host-page  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 3, 2017 2:36 PM   in response to: Eitan Arbel in response to: Eitan Arbel
Eitan Arbel wrote:
what if you remove the UserSession and just use WebApplication.ReferringURL ?'

No, it is the same, I always get the xxxxISAPI.dll/$/start/?yyyy, it looks as the start will redirect to a URL with the session id in it, before I get control.
Soren Hartig

Posts: 13
Registered: 7/17/04
Re: ReferringURL or how to get the URL of the host-page  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 4, 2017 12:04 AM   in response to: Soren Hartig in response to: Soren Hartig
I have just added the serial number for our IntraWeb subscription so that I can get priority support.
I hope this helps, I really need to get the referring url and not just the start/$ url.
Chad Hower

Posts: 613
Registered: 3/2/07
Re: ReferringURL or how to get the URL of the host-page (Serial 201631920) [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 4, 2017 11:45 AM   in response to: Soren Hartig in response to: Soren Hartig
On 4/4/2017 3:02 AM, Soren Hartig wrote:
In short, when I read the string
"UserSession.WebApplication.ReferringURL" I get the url of my running
project (standalone or ISAPI) address. I was hoping to get the
address of the host. My IntraWeb page is hosted inside an iframe in a
web page. But if that is the wrong way to do it, how can I do it
otherwise. regards

The iframe is likely your problem as the referrer loads the iframe, and
the iframe is what loads your IW app and it has no referrer.
Soren Hartig

Posts: 13
Registered: 7/17/04
Re: ReferringURL or how to get the URL of the host-page (Serial 201631920) [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 5, 2017 5:03 AM   in response to: Chad Hower in response to: Chad Hower
Chad Hower wrote:
The iframe is likely your problem as the referrer loads the iframe, and
the iframe is what loads your IW app and it has no referrer.

Thank you for your answer, but in the meantime I have taken the iframe out of the evaction and just use a page that redirects. It is a MVC project and ends with:
return Redirect("https://server/Name/NameISAPI.dll/$/start/?formname=TestFormGrid");
But inside the Delphi code, ReferringURL will always be: "https://server/Name/NameISAPI.dll/$/start/?formname=TestFormGrid" and if I take it from WebApplication.ReferringURL, it will be almost the same URL, but $/start has been replaced with the e.g.: gASDfoTzC0Mby556iZv2fW the session id. So I think that you wont be able to get the real reffering page, but always will get the "start", because IntraWeb redirects to a page with the session id in it.
I have the source code of IntraWeb, but I can't fugure out were to grap the referring URL.
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: ReferringURL or how to get the URL of the host-page (Serial 201631920) [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 5, 2017 3:08 PM   in response to: Soren Hartig in response to: Soren Hartig
Soren Hartig wrote:

In short, when I read the string
"UserSession.WebApplication.ReferringURL" I get the url of my running
project (standalone or ISAPI) address. I was hoping to get the
address of the host. My IntraWeb page is hosted inside an iframe in a
web page. But if that is the wrong way to do it, how can I do it
otherwise. regards

Edited by: Soren Hartig on Dec 21, 2016 4:27 AM

ReferringURL is a property that just gives you the HTTP referer header
field. This fields is not "reliable" in any way. Even more if you are
running inside an iFrame. Each browser seems to report a different HTTP
referer in that case

Please check this:
http://stackoverflow.com/questions/8468335/what-is-the-http-referer-if-the-link-is-clicked-in-an-iframe
Soren Hartig

Posts: 13
Registered: 7/17/04
Re: ReferringURL or how to get the URL of the host-page (Serial 201631920) [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 8, 2017 2:24 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
ReferringURL is a property that just gives you the HTTP referer header
field. This fields is not "reliable" in any way. Even more if you are
running inside an iFrame. Each browser seems to report a different HTTP
referer in that case

Please check this:
http://stackoverflow.com/questions/8468335/what-is-the-http-referer-if-the-link-is-clicked-in-an-iframe

Thank you for the answer, but however the problem is more inside IntraWeb itself I think, I am never able to get the referer, it is always the $/start, i.e. the url that I open the IntraWeb page with. I have checked it inside a mvc page and there I get the real referer. So does IntraWeb make a redirect itself before the code is started?
Soren Hartig

Posts: 13
Registered: 7/17/04
Re: ReferringURL or how to get the URL of the host-page (Serial 201631920) [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 11, 2017 11:25 PM   in response to: Soren Hartig in response to: Soren Hartig
I'll try to look in the source code, thank you for your answers.
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: ReferringURL or how to get the URL of the host-page (Serial 201631920) [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 16, 2017 5:04 PM   in response to: Soren Hartig in response to: Soren Hartig
Soren Hartig wrote:
Alexandre Machado wrote:
ReferringURL is a property that just gives you the HTTP referer header
field. This fields is not "reliable" in any way. Even more if you are
running inside an iFrame. Each browser seems to report a different HTTP
referer in that case

Please check this:
http://stackoverflow.com/questions/8468335/what-is-the-http-referer-if-the-link-is-clicked-in-an-iframe

Thank you for the answer, but however the problem is more inside IntraWeb itself I think, I am never able to get the referer, it is always the $/start, i.e. the url that I open the IntraWeb page with. I have checked it inside a mvc page and there I get the real referer. So does IntraWeb make a redirect itself before the code is started?

Yes, IW does something like that during initialization.

However you didn't explain what are you trying to accomplish. As I mentioned before, this is not reliable in any way, even more when running inside an iframe. If you try different browsers you will probably get different results. Thus, if you rely on it, your application might fail.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02