views:

136

answers:

1

In this asp.net page, there is a link that leads to another page in a certain subfolder, It has always worked.

Recently, for technical reasons (irrelevant) , the port number had to be changed (80 to 81). Every link keeps working, but there is ONE that doesn't keep the port number no matter what.

<asp:HyperLink runat="server" Text="link1" NavigateUrl="~/default.aspx" /> | 
<asp:HyperLink runat="server" Text="LINK2" NavigateUrl="~/Secure/RACs/default.aspx" /> | 
<asp:HyperLink runat="server" Text="link3" NavigateUrl="~/Admin/page3.aspx" /> | 
<asp:HyperLink runat="server" Text="link4" NavigateUrl="~/Admin/page4.aspx" /> | 
<asp:HyperLink runat="server" Text="link5" NavigateUrl="~/Admin/page5.aspx" /> | 
<asp:HyperLink runat="server" Text="link6" NavigateUrl="~/Admin/page6.aspx" /> | 
<asp:HyperLink runat="server" Text="link7" NavigateUrl="~/Admin/page7.aspx" /> 

As you can see, everry link gets it's URL through "~", and every single one gets the :81 port number after the IP, but link 2 just doesn't keep any port number (if you click on it, it loses the port number, then if you add it back in the navigation bar in the browser, it works, but then and click anything inside it that leads to any other page within the same folder, the same problem occurs)

Then I went to check and compare the headers and masterpage loadins, there doesn't seem to be anything that would affect port number. Codes follow:

The LINK2 leads to:

<%@ Page Language="VB" MasterPageFile="~/Common/MasterPage.master" Title="LINK2" Culture="pt-BR" UICulture="pt-BR" %>
<%@ Register TagPrefix="uct" TagName="RacControl" Src="~/Secure/RACs/RACControl.ascx" %>
<%@ Register TagPrefix="uct" TagName="DOCsControl" Src="DOCsControl.ascx" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<%@ Import Namespace="Pm.Common.Type" %>

And (for example) link 3 leads to:

<%@ Page Language="VB" MasterPageFile="~/Common/MasterPage.master" Title="LINK3" %>
<%@ Register TagPrefix="uct" TagName="link3" Src="~/Admin/UsersControl.ascx" %>
<%@ Register TagPrefix="uct" TagName="CreateUserControl" Src="~/Admin/CreateUserControl.ascx" %>

Where would be any issue that would cause the page to lose the port number everytime I want to access anything on the "/secure/racs" folder ?

I'll be watching this question, please comment, anything will help, and I'll post more code if requested.

--[EDIT 1]-- Running fiddler, and clicking in one link (the main one) that loses port when clicked, I get this redirection:

alt text

A good thing is that the problem isn't in the request, a bad thing is that I don't know what is redirecting it to the default port while not redirecting the rest of the pages.

A: 

Are you sure the Secure folder isn't configured to redirect to an HTTPS connection and the reason it loses the port is that it's actually on port 443?

What is the difference between the config of the Admin and Secure directories in IIS?

Perhaps you should use the Fiddler or Charles proxy tools to see what actually happens with the request from your browser?

Dave Anderson
It doesn't lead to port 443, or HTTPS (checking on the navigation bar), I'll check on the IIS, thanks for the tips
MarceloRamires
Look at the edit, I ran fiddler. Just logged in the portal using IE and clicked in the link that loses port when opened. check it out! (still didn't check IIS)
MarceloRamires
I'm taking a look at the IIS, what could be different in the folder ?
MarceloRamires