1

我创建了一个 asp.net web 应用程序,它可以在它的文件系统(子目录)中动态创建 asp.net web 应用程序项目。

假设我在 IIS 中为每个创建的 webapp 手动创建虚拟目录。

当我尝试访问这些应用程序(http://localhost//<virtual-dir>)时,我收到一个错误:

Parser Error Message: Could not load type 'Template29.Template29'.

Source Error:

Line 1: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Template29.master.cs" Inherits="Template29.Template29" %>

Line 2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

我究竟做错了什么?

提前致谢,

加尔。

4

1 回答 1

1

您的虚拟目录是否在 IIS 中设置为应用程序?如果是这样,也许您对 web.config 继承有一些问题:

http://msdn.microsoft.com/en-us/library/ms178685.aspx

顺便提一句。您可以使用 Microsoft.Web.Administration 程序集在 IIS 7 上自动创建新站点,这太棒了:)

http://blogs.msdn.com/b/carlosag/archive/2006/04/17/microsoftwebadministration.aspx

http://learn.iis.net/page.aspx/165/how-to-use-microsoftwebadministration/

于 2010-07-21T12:24:33.260 回答