locked
urgent: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0 RRS feed

  • Question

  • User888441741 posted

    i spent lot of my time trying to figure out what cause this error and still cluless

    i have web project and dal project and i have reference in both dal and web project the following dlls and the dll is physicall in the bin folder.

    Microsoft.Practices.EnterpriseLibrary.Caching.dll
    Microsoft.Practices.EnterpriseLibrary.Caching.xml
    Microsoft.Practices.EnterpriseLibrary.Common.dll
    Microsoft.Practices.EnterpriseLibrary.Data.dll
    Microsoft.Practices.EnterpriseLibrary.Data.xml
    Microsoft.Practices.ObjectBuilder.dll
    Microsoft.Practices.ObjectBuilder.xml

     

    Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.

     Error Information
     Name  Value
    Build Version 3.00.00 Build 1
    Server  
    UserID  
    Source daab
    Exception Type System.IO.FileLoadException
    Message Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.
    StackTrace    at daab.LoginUserInfo_DA.GetLoginUserInfo(String userId)
       at Model.LoginUserInfo.GetLoginUserInfo(String UserId)
       at Global.Session_Start(Object sender, EventArgs e)
       at System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e)
       at System.Web.SessionState.SessionStateModule.CompleteAcquireState()
       at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
       at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    TargetSite System.Data.IDataReader GetLoginUserInfo(System.String)

    Tuesday, July 15, 2008 11:18 AM

All replies

  • User-465344484 posted

    Hi everyone, just trying to resurrect the above post, as I am getting the same issue, and cant find much of anything on the Internet.

    The Enterprise Library is working 99% of the time for my application.  In particular, we are employing the Logging Application Block.  However, periodically (let's say once every 2 weeks) we receive the following error details on the yellow screen:

    Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Access is denied.

    If we bounce the IIS App Pool, the issue is resolved and were back to writing records to the Logging database.  Any ideas on why we would receive an "Access is denied" error message?  The particular exception that is thrown is "FileLoadException".

    Thanks

    Tuesday, February 17, 2009 9:23 AM
  • User-465344484 posted

    Sorry for the bump, but Im still struggling with this issue..

    Wednesday, April 22, 2009 9:15 AM
  • User888441741 posted

    get rid of 'Microsoft.Practices.EnterpriseLibrary' thats what i did

     good luck.

    Wednesday, April 22, 2009 9:24 AM
  • User1673182887 posted

    Here is a post that helped me.

    If you are like me.. you are using the wrong dll's from the C:\EntLib3Src dir and not C:\Program Files\Microsoft Enterprise Library 3.1 - May 2007\ dir

    That clear the issue up for me... below is the link to some other usefull information.

    Cheers. 

    http://blogs.msdn.com/tomholl/archive/2007/04/19/avoiding-configuration-pitfalls-with-incompatible-copies-of-enterprise-library.aspx

    Tuesday, October 20, 2009 6:08 PM
  • User-1402564948 posted

     don't take my advice, but what I did is deleted all the assemblies.  it appears that VS 2010 automatically installs newer assemblies and asp.net 4.0 ...

    Saturday, December 26, 2009 11:50 PM
  • User-639926055 posted

    well i found that I had used wrong assembly reference in my web config, just check that, then rebuild your project hope this will work fine.
    i createda a one dataaccess libraray project in which i was using the enterprise library data block, when I add the reference in my website i didnt updae the webconfig with the version which is pointing in the project plus i match the dll form the gac. with same uid
    I found that my web config inthe website was not updated that why i was getting this error, there is no other issue, we just need to add the right reference of dll, inthe app config or project and the web config of website.

    Tuesday, April 19, 2011 5:49 AM