I created an asp.net web application that can create dynamically asp.net web application projects within it's file system (subdirectories).
Lets say I manually create Virtual Directory in the IIS for each webapp created.
When I try to access those applications (http://localhost/<virtual-dir>
/) I get an error:
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 PU开发者_开发百科BLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
What am I doing wrong?
Thanks in advance,
Gal.
Is your virtual directory set as application in IIS ? If so, maybe you have some problems with web.config inheritance :
http://msdn.microsoft.com/en-us/library/ms178685.aspx
btw. you could use Microsoft.Web.Administration assembly to automate creation of new sites on IIS 7, it's awesome :)
http://blogs.msdn.com/b/carlosag/archive/2006/04/17/microsoftwebadministration.aspx
http://learn.iis.net/page.aspx/165/how-to-use-microsoftwebadministration/
精彩评论