I'm facing with an odd situation and I think IIS is the cause, however since I'm not an expert in it so it is a guessing at this point. I asked our network admin and he did not agree.
In part of my C# code I'm redirecting the user to a new URL:
string currentURL = HttpContext.Current.Request.Url.Host;
string url = string.Format("http://" + currentURL + "/AppDir/Page1.aspx?Item={0}&From={1}",
employeeNo, "Search");
Response.Redirect(url, true);
But, out of nowhere, a folder gets inserted into my URL path, and it is rendered as something like:
http://www.example.org/
portal
/Page1.aspx
It is funny that there is no a single keyword as "portal" in my project, so I end up with a 404 Not Found page.
- What is causing it? Can this be a policy defined in IIS by admin?
- It works fine locally, but it happens when I upload it to a server.