I am creating a Proof-of-concept for Virtual Path Providers.
Basically what I am doing, is dynamically creating an .aspx page via XML/XSL and streaming it back into the ASP.Net pipeline using a VirtualPathProvider.
When dynaimcally creating an .aspx page (without a master page) it works without issues. However when I have the page use a Master File, it no longer works.
Here is the .master/.aspx files produced from the XML/XSL:
<%@ Master Language="C#" %><script runat="server"></script>
<html >
<body>
<form runat="server" ID="form1">
<div>
<asp:ContentPlaceHolder runat="server" ID="Heading" />
<asp:ContentPlaceHolder runat="server" ID="Body" />
</div>
</form>
</body>
</html>
<%@ Page Language="C#" MasterPageFile="/VPPPOC/VPP/MasterPage.master" %><script runat="server">
</script><asp:Content runat="server" ID="Content1" ContentPlaceHolderID="Body" >
<asp:Label runat="server" ID="Label1" text="Overridden Body Placeholder" />
</asp:Content>
When serving up the file, I get the following error in the browser:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0006: Metadata file 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\vpppoc\7db620a7\d877d3d7\App_Web_masterpage.master.b14aa714.r_uzicsh.dll' could not be found
The .aspx/.master output above is directly from the VirtualPathProvider. (I write the output to a test output file). Therefore I know that both of the files are being served by my VirtualPathProvider. Does anybody have any ideas as to why this is happening?
Thanks in Advance...