R
Robin Yarnell
Hello,
I would like to create a user control, place it in a directory and use
it for many different sites. The problem I am having is when I use the
loadcontrol I get an error. The error states "The virtual path
'/head/header.ascx' maps to another application, which is not allowed." This
is because allowCrossAppMapping defaults to false in the HTTPRequest.MapPath
that LoadControl uses. Is there a way that I can make the default for
allowCrossAppMapping True instead of False? Or just set it in code each time
I use it?
Here is a bit of the stack trace:
System.Web.HttpRequest.MapPath(String virtualPath, String baseVirtualDir,
Boolean allowCrossAppMapping)
System.Web.UI.BaseParser.MapPath(String path, Boolean allowCrossAppMapping)
Any help on this would be appricated.
Thanks in advance.
Robin
I would like to create a user control, place it in a directory and use
it for many different sites. The problem I am having is when I use the
loadcontrol I get an error. The error states "The virtual path
'/head/header.ascx' maps to another application, which is not allowed." This
is because allowCrossAppMapping defaults to false in the HTTPRequest.MapPath
that LoadControl uses. Is there a way that I can make the default for
allowCrossAppMapping True instead of False? Or just set it in code each time
I use it?
Here is a bit of the stack trace:
System.Web.HttpRequest.MapPath(String virtualPath, String baseVirtualDir,
Boolean allowCrossAppMapping)
System.Web.UI.BaseParser.MapPath(String path, Boolean allowCrossAppMapping)
Any help on this would be appricated.
Thanks in advance.
Robin