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
c # asp.net iis


source to share


No one has answered this question yet

Check out similar questions:

1603
Configuration error: This configuration section cannot be used on this path
1425
Calculate relative time in C #
529
Invalid cross-stream operation: control is from a thread other than the one that was created on
8
Load balancing in Asp.net, what should I consider when developing?
2
Stop action requiring long shutdown time load balancing
0
ASP.NET MVC2 provides 70% page rendering
0
Asp.net MVC4 application using EF6 taking a long time for initial cold load
0
adapter.Fill takes a long time to run
0
Calling WCF service for a long time to respond for the first time
0
IIS load balancing for asp.net application



All Articles
Loading...
X
Show
Funny
Dev
Pics