【发布时间】:2013-05-02 18:09:15
【问题描述】:
我有一个生产系统和测试系统,都运行 IIS。在生产系统中,一切运行良好。在测试系统中,我有一个包含站点代码的文件夹的定向副本,该文件夹被设置为虚拟目录。 App_Code 文件夹位于根目录中,包含所有 .cs 文件。在测试中运行同一站点时,我得到一个
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'SPTasks.master'.
Source Error:
Line 1: <%@ Master Language="C#" inherits="SPTasks.master"%>
Line 2: <html>
Line 3: <head runat="server">
Source File: /SPTasks/master.master Line: 1
知道为什么这会在测试中而不是在生产中吗?代码是不是因为某种原因没有编译?
谢谢!
【问题讨论】:
-
这些是不同的机器吗?你检查过应用程序池中的框架吗?是例如
Mvc安装了吗? -
它们是不同的机器。他们都使用 ASP.NET Framework 2.0 并安装了 3.5 附加功能。我不确定 MVC 的具体情况。有没有在 IIS7.5 中快速检查的方法?
-
@Silvermind 根据 MVC 的版本,希望是 3+,您不需要在服务器本地安装它。它应该完全从应用程序的 bin 文件夹中运行。
-
@steventnorris kettch 关于安装
Mvc是正确的,但这只是依赖要求的问题。检查此问题是否适用。 Do I need to install MVC 3/4 on web server to run mvc application -
好吧,我没有使用 Visual Studio 来创建这些文件,因此可部署的依赖项已经失效。我正在逐个文件地创建文件和文件夹结构。