Current.Server.MapPath takes a long time to retrieve the mapped path

I am using a method Current.Server.MapPath(virtualPath);

in my asp.net application to retrieve the mapped path. my profiler shows that this operation takes a significant amount of time to complete. it is called ProcessHostConfigUtils:GetSiteNameFromId

, and this call takes a significant amount of time to return.

-System.Web.HttpRequest:MapPath (method time = 0 ms, total time = 2964 ms)
-->System.Web.Hosting.HostingEnvironment:MapPathActual (method time = 0 ms, total time = 2964 ms)
--->System.Web.Configuration.ProcessHostMapPath:MapPathCaching (method time = 0 ms, total time = 2964 ms)
---->System.Web.Configuration.ProcessHostConfigUtils:GetSiteNameFromId (method time = 2964 ms, total time = 2964 ms)

      

The site is hosted in a load balanced environment. Any ideas for improving this runtime.

+3


source to share





All Articles