IP address changing at runtime

IP address changing at runtime

  

Hi All,

In one of our applications we are trying to create a pdf using Html2PDFConverter by providing the link of a page to the extension. The issue is that the pdf is not getting created because at runtime the link which is getting created differs from what should be. On investigation we found that in the log there is an additional space in the server IP of the link that was being passed to the extension. To add further, we have created a site parameter to dynamically provide the server IP to any link. 

So for example, if the Site.serverIP parameter is set as "https://mail.google.com" and the link is created as Site.serverIP +"/mail", the link should become "https://mail.google.com/mail". However, the link that was being logged is "https://mail.google. com/mail" which results in an error. 

We have even tried IP address like "https://192.168.1.2" as serverIP site parameter but this also becomes "https://192.168.1. 2". Removing the space at runtime from the parameter before passing it to the extension was also unsuccessful.

This is working fine in our dev environment but only comes at production environment. Is there any configuration that we are missing? Any help will be highly appreciated.

Thanks in advance.

Tarun,

If the page you are given to html to pdf converter is in the application, you can use a better approach than the site property.

Use the GetEntryUrl function.

But I never saw extra spaces being adding to a variable like you are reporting, without being a peace of code...

Jauch wrote:

Tarun,

If the page you are given to html to pdf converter is in the application, you can use a better approach than the site property.

Use the GetEntryUrl function.

But I never saw extra spaces being adding to a variable like you are reporting, without being a peace of code...

Hi Jauch,

Thanks for the reply. 

I have tried with GetEntryUrl as well and I am facing the issue with it.


Hi Tarun,

Is the added space you are seeing just in the logs? Sometimes in the logs, extra spaces are added, but that is not in fact the case when the logic is being processed.

I've had a few cases where I've tried to debug why an extra space was in a URL in the logs but it turned out the space wasn't actually being added, but there was some other problem going on.

Justin

Hi Justin,

Thanks for the reply, and I believe that you are right.We have figured out the issue and it had nothing to do with what was coming in the log. The log was quite misleading and resulted us in working on something entirely different.   Your reply really helped. Appreciate it.

Thanks again.

Tarun

Hi Tatum,

What was the issue? :)

Jauch wrote:

Hi Tatum,

What was the issue? :)

Hi Jauch,

The issue was related to the permission that is required for the temp folder used by the extension.