Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: Why is System.Web.Extensions.dll loaded when I call FirstOrDefault?

$
0
0
ok, I see now how the System.Web.dll gets loaded. It is done by the Firebird .Net Provider while opening a Connection in the method FirebirdSql.Data.FirebirdClient.ni.dll!FirebirdSql.Data.FirebirdClient.FbConnectionInternal.GetHostingPath()

Image
Image

Hee is the code of the function:
private string GetHostingPath()
{
      System.Reflection.Assembly assembly;
      try
      {
                 assembly = System.Reflection.Assembly.Load(string.Format("System.Web, Version={0}.{1}.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", Environment.Version.Major, Environment.Version.Minor));
      }
      catch (FileNotFoundException)
      {
                return null;
      }
      catch (FileLoadException)
      {
             return null;
      }
      catch (BadImageFormatException)
      {
            return null;
      }
      return (string)assembly.GetType("System.Web.Hosting.HostingEnvironment")
                .GetProperty("ApplicationPhysicalPath")
                .GetValue(null, null);
}
And the Extension DLL gets loaded 1s later. So does this mean when the Web.dll gets laoded the Web.Extension also get loaded everytime?

Viewing all articles
Browse latest Browse all 1793

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>