What is causing the double folder in the url path when redirecting?

0

I have migrated an old, but unfortunately still in use application from one server to another. The code has not been touched whatsoever. Basically a copy and paste from one server (Windows Server 2003) to the other (Windows Server 2016 Standard).

AFAIK, this error never occurred on the previous server, however now when redirecting to a specific page, the file containing folder is duplicated in the path.

New server is using IIS Version 10.

As this worked fine on the previous server, and no code has been touched, I assume this is some setting than needs tweaking in IIS/web.config.

What could be causing this?

I have compared IIS settings between the two servers. But these versions are so far part there is not really much to compare.

Here is the error from the log:

An unhandled exception occurred:
System.Web.HttpException (0x80004005): The file ´/SearchAndOrder/SearchAndOrder/ConfirmBasket.aspx´ does not exist.
   at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Here is the duplicated folder:

/SearchAndOrder/SearchAndOrder/ConfirmBasket.aspx

The path should be:

/SearchAndOrder/ConfirmBasket.aspx

asp.net
iis
asked on Stack Overflow Jul 22, 2019 by acb91 • edited Jul 22, 2019 by acb91

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0