Skip to content

Commit

Permalink
DNET-293
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet committed Mar 27, 2010
1 parent cfd853e commit d3bdf16
Showing 1 changed file with 16 additions and 4 deletions.
Expand Up @@ -546,10 +546,22 @@ private string GetProcessName()
return "fbnetcf";
#else
// showing ApplicationPhysicalPath may be wrong because of connection pooling; better idea?
if (System.Web.Hosting.HostingEnvironment.IsHosted)
return System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
else
return Process.GetCurrentProcess().MainModule.FileName;
if (System.Web.Hosting.HostingEnvironment.IsHosted)
{
return System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
}
else
{
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetEntryAssembly();
if (assembly != null)
{
return assembly.Location;
}
else // if we're not loaded from managed code
{
return Process.GetCurrentProcess().MainModule.FileName;
}
}
#endif
}

Expand Down

0 comments on commit d3bdf16

Please sign in to comment.