[Mono-list] Mapping across application not allowed?

Chris Aitken chris at ion-dreams.com
Sat Jul 23 18:58:25 EDT 2005


> I just tested it thoroughly and there's no doubt about it.  I 
> create a user control in the "/Controls/" subdirectory.  I 
> create a page in the "/Modules/Legislators" subdirectory and 
> include the control.  I get an error saying "Mapping across 
> application not allowed."
> 
> I then create a page in the root directory and include the 
> control. Everything works perfectly after that - both pages 
> display the user control without any errors.
> 
> The book I'm using for my web site, "ASP.NET Website 
> Programming" by Wrox (ISBN 1-86100693-4) puts the user 
> controls for the subdirectories into the subdirectories and I 
> was wondering why they put them there.  It's all starting to 
> make sense now.
> 
> Windows .NET doesn't care where you put them, but Mono is 
> probably following a stricter set of rules.

Guys,

I'm unsure about this.

I have created /workng/subdir/page.aspx (/ = webroot) [1], which calls the
same ascx as before (from /a/ssi/footer.ascx).

No problems. See http://www.hostmono.net/working/subdir/server.aspx for
proof.

Chris

[1]
<%@ Page Language="C#" trace="true" debug="true" %>
<%@ Register TagPrefix="UserControl" TagName="Footer"
Src="/a/ssi/footer.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>HostMono Blah</title>
<style type="text/css" media="all">
        @import url(a/c/hostmono.css);
</style>
</head>
<body>
        <div id="assy">
                <h2>Software</h2>
                <h2>Assemblies</h2>
        </div>
        <UserControl:Footer id="myFooter" runat="Server" />
</body>
</html>



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Mono-list mailing list