0

我正在尝试访问像 xxx.svc 这样的 WCF 服务端点。我得到了这个错误:

The exception message is: Could not load file or assembly 'App_Code' or one of its dependencies. The system cannot find the file specified

我打开了融合日志,得到了这个:

=== Pre-bind state information ===
LOG: User = xxx\xxx
LOG: DisplayName = App_Code
 (Partial)
LOG: Appbase = file:///D:/myService/
LOG: Initial PrivatePath = D:\myService\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\myService\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

我的 Web 应用程序中没有 App_Code 文件夹。为什么要找 App_Code ???

谢谢!

4

2 回答 2

1

我只是在睡个好觉之后才弄清楚。我忘记了 precompiledApp.config 文件。

于 2012-07-09T02:44:29.763 回答
0

可能您使用了无效的引用,或者您没有引用您想要使用的东西。解决方案是查看您的 web.config 和所有引用,搜索需要但缺少的引用或无效的引用。

于 2012-06-12T10:21:32.770 回答