I am using a web application project which gets published for it's deployment hence it precompiles. Views, Scripts, Content stay intact but code is compiled into a dll. This is the current state of the application and it is unreasonable to change into a
different project type this far into the development process.
Hmm, unless the publish tool is doing something more than it used to, this is not precompile. Precompile is when you run aspnet_compiler.exe and the views and pages get "precompiled" before deployment into DLLs in ~/bin. You can confirm this by opening the
.aspx files and there should be no content inside.
aspfromatoz
I am not sure I understand your comment about the security implications. Could you please explain to me how this could become a security issue? I am having a difficult time understanding why precompiling an assembly is affecting the intended functionality
of overriding these classes.
Well, honestly I don't think it's a major security concern because the web server should be locked down properly anyway, but I think perhaps the reason for the precompile (and not just a compliation in visual studio -- i'm talking baout the proper aspnet_compiler.exe
precompile) was that some customers of Microsoft wanted some feature that prevented files being modified on the server and then being allowed to be dynamically compiled. This dynamic compilation is exactly what a VPP is for, so IMO it seems that those are
two different mutually exclusive goals.
So if all you're doing is a normal compile in Visual Studio and the .aspx files are deployed as-is, then you're not really doing precompile. And so then if your VPP isn't working, then I think you're running into some other problem. It's hard to diagnose
through the forum though, so I might be wrong.
BrockAllen
All-Star
27434 Points
4891 Posts
MVP
Re: Alternative to VirtualPathProvider Using PreCompile
Mar 23, 2012 07:40 PM|LINK
Hmm, unless the publish tool is doing something more than it used to, this is not precompile. Precompile is when you run aspnet_compiler.exe and the views and pages get "precompiled" before deployment into DLLs in ~/bin. You can confirm this by opening the .aspx files and there should be no content inside.
Well, honestly I don't think it's a major security concern because the web server should be locked down properly anyway, but I think perhaps the reason for the precompile (and not just a compliation in visual studio -- i'm talking baout the proper aspnet_compiler.exe precompile) was that some customers of Microsoft wanted some feature that prevented files being modified on the server and then being allowed to be dynamically compiled. This dynamic compilation is exactly what a VPP is for, so IMO it seems that those are two different mutually exclusive goals.
So if all you're doing is a normal compile in Visual Studio and the .aspx files are deployed as-is, then you're not really doing precompile. And so then if your VPP isn't working, then I think you're running into some other problem. It's hard to diagnose through the forum though, so I might be wrong.
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/