Monday 26 January 2015

Access to ClickOnce application directory

A ClickOnce application, through GUI, impersonates a user to query a database. For some reason this impersonated user does not have access to EntityFramework.dll in the application directory.

************** Exception Text **************
System.IO.FileLoadException: Could not load file or assembly 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Access is denied.

File name: 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

I wasted absolutely unreasonable time looking in a wrong direction: EntityFramework version conflicting with .NET Framework version and so on. While a solution was on the surface: the impersonated user to be given Read & Execute access to the application directory.


No comments:

Post a Comment