Bit*_*ler 4 .net-4.5 entity-framework-6
所以我看到了一堆这个问题的答案。似乎没有一个能解决我的问题。我正在使用 servicestack 作为自托管 web 服务运行该项目。
尽管如此,我仍然收到错误消息:
无法加载文件或程序集“EntityFramework”或其依赖项之一。访问被拒绝。":"EntityFramework"
=== Pre-bind state information ===
LOG: DisplayName = EntityFramework
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: EntityFramework | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/MyUserName/Desktop/TempFolder/Web.MyProject.Service/bin/x86/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\MyUserName\Desktop\TempFolder\Web.MyProject.Service\bin\x86\Debug\Web.MyProject.Service.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/MyUserName/Desktop/TempFolder/Web.MyProject.Service/bin/x86/Debug/EntityFramework.DLL.
ERR: A fatal error occurred when retrieving next codebase for download (hr = 0x80070005).
Run Code Online (Sandbox Code Playgroud)
任何人都可以指点我一些工具来追踪问题的原因(除非你知道问题是什么;-D)。
原来“访问被拒绝”并没有说谎。我使用的上下文是围绕(继承自)实际 EntityFramework 上下文的包装器,该上下文在构造函数中实现了一些模拟。被模拟的用户无权访问 bin 目录,这是导致错误的原因。
| 归档时间: |
|
| 查看次数: |
231 次 |
| 最近记录: |