Links broken due to port being added to the URL

Posted by Community Admin on 04-Aug-2018 16:29

Links broken due to port being added to the URL

All Replies

Posted by Community Admin on 16-Dec-2011 00:00

Hi,

For some reason, it seems the port is added to some URLs, while it shouldn't be.
I have no idea why (some configuration problem somewhere?). This is causing issues for us (these URLs do not work because of the addition of the port), especially in 2 specific cases:

1- We have a custom backend login page (to add https), which contains:

<sf:LoginForm AllowSelectMembershipProvider="true" ID="LoginFormControl"
    RememberMeSet="true"
    ShowChangePasswordLink="false"
    ShowForgotPasswordLink="false"
    ShowHelpLink="false"
    ShowRegisterUserLink="false"
    DisplayRememberMe="true"
    DestinationPageUrl="~/Sitefinity"
    runat="server" />

The DestinationPageUrl="~/Sitefinity" part makes it so a login page like this:
mysite/.../Login
leads to:
http://mysite:448/Sitefinity/

(448 is the https port, the http one is 85. Only the login page is supposed to be https, the back office is supposed to be http.)

2- On the backend "Pages" page, when you try to preview a page by clicking the "View" link, the port is added to the URL (ie: when clicking the link to view the home page, the link is http://mysite:85/home rather than just http://mysite/home)

Any ideas?

Thanks.

Posted by Community Admin on 21-Dec-2011 00:00

Hello Thomas,

There is a useful setting called "Site URL Settings" which allows you to change the absolute URLs generated by Sitefinity. It can be used when your installation is behind a specific port, have some internal redirection or use proxy. We have discussed a similar problem in this thread, so I can recommend it for you to review it.

Greetings,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 21-Dec-2011 00:00

Hi Victor,

Thanks for the tip. This seems to have fixed the second issue, but not the first one. Could be due to the HTTPS -> HTTP trip. Can you think of a solution?

If everything fails, I guess I could hard code an absolute DestinationPageUrl value, but I'd like to avoid that.

Posted by Community Admin on 26-Dec-2011 00:00

Hello Thomas,

It looks like some issue when calling Page.Response.Redirect (which we call with the parameter that you specify in DestinationPageUrl). I found the following article in StackOverflow:

http://stackoverflow.com/questions/853513/how-to-overwrite-response-redirect-to-prevent-port-coming-with-it

It looks like you could add this attribute - 

useFullyQualifiedRedirectUrl="false"

under the <httpRuntime> element. I hope this helps.

Greetings,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 27-Dec-2011 00:00

Hi Lubomir,

Thanks for your time.
I also stumbled upon this info while looking for a solution. But that doesn't seem to be the problem, because the value of this attribute is false by default. Just in case, I double checked the value with this piece of code:

HttpRuntimeSection section = ConfigurationManager.GetSection("system.web/httpRuntime") as HttpRuntimeSection;
bool test = section.UseFullyQualifiedRedirectUrl;

And it is false indeed.

Posted by Community Admin on 29-Dec-2011 00:00

Hi Thomas,

Could you search your config files and web.config for this pattern: ":448" - I'm not sure where it is saved. Also please check if you have some Global.asax code that might perform a redirect.

Greetings,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Dec-2011 00:00

Hi Lubomir,

No sign of "448" in our solution. It must get that dynamically from the server somehow.
We do have a Global.asax,  but it doesn't perform a redirect. It add routes to enable the custom login page.

I'll try setting the DestinationPageUrl property to an absolute URL next time I deploy the app in production environment (which I won't be able to do before January the 9th).

Posted by Community Admin on 03-Jan-2012 00:00

Hello Thomas,

It would help if you gave us access to your backend so we could investigate. It is possible that you added some custom code or widgets that redirect to this hardcoded port but you forgot about them. You could search in the sf_control_properties table, in the "val" column for ":448" as well - if there are any custom controls/widgets with this value they should be stored there.

All the best,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 03-Jan-2012 00:00

Hi Lubomir,

No, the port is not hardcoded in any way in the app. Actually, the same app works fine on other servers, so it specific to our production servers that have a more complex configuration.

I'll be able to tell you next week if my workaround works or not.

Posted by Community Admin on 07-Mar-2012 00:00

With all that said, it seems the port being added to the URL was a Sitefinity bug after all.
www.telerik.com/.../pits.aspx

I'll upgrade to SF 5.0 and see...

Posted by Community Admin on 08-Mar-2012 00:00

Hi Thomas,

Please make sure to verify the behaviour on your end, using our official 5.0 release as the bug is marked as resolved.

Regards,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed