Code Comments
Programming Forum and web based access to our favorite programming groups.I have been troubleshooting an issue with a VirtualPathProvider not working on projects deployed with the Web Deployment Project (basically pre-compiled and merged). Some reading I've done seems to indiciate that you can't use VPP's with precompiled websites. What I don't understand is, how are you supposed to use VPP's in production enviornments? For example, "Designing URL's for MSDN2" (http://msdn.microsoft.com/msdnmag/i...DN/default.aspx) talks about how the MSDN team used VPP's for their new site - so does MSDN not precompile their website? This seems unlikely that they have all of thei r source files sitting on their webserver. Is there some type of workaround to use VPP's with precompiled sites? Any help/ideas would be appreciated. Thank You. -- -Steven Berkovitz MBC Computer Solutions Ltd. http://www.mbccs.com http://www.orderdynamics.com
Post Follow-up to this messageHi Steven, From David Ebbo's blog comment here: #David Ebbo's ASP.NET blog : Overriding ASP.NET combine behavior using a VirtualPathProvider http://blogs.msdn.com/davidebb/arch.../27/497339.aspx <quote> ..precompilation does not work with VirtualPathProviders. I think it could have been made to work in theory, but there were some non-trivial issues, and scheduling made us decide not to support it. </quote> I've also found a recent case regarding similiar question as yours in our internal support database, the log there also confirmed that this is still the case, VPP still doesn't work for precompiled website. I don't think MSDN doc team has some internal workaround for this. This is a limitation of ASP.NET 2.0 compilation model. Fortunately product team are already aware of this and I believe this will be definitely improved in future version. Regards, Walter Wang (wawang@online.microsoft.com, remove 'online.') Microsoft Online Community Support ======================================== ========== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ======================================== ========== This posting is provided "AS IS" with no warranties, and confers no rights.
Post Follow-up to this messageHi Steven, How are you doing? Have you got any further idea on this issue or does Walter's last reply helps you some? If there is anything else we can help, please feel free to post here. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead This posting is provided "AS IS" with no warranties, and confers no rights.
Post Follow-up to this messageHi Steven, It seems that this just isn't possible - which I still don't understand as MSDN claims to use it... -- -Steven Berkovitz MBC Computer Solutions Ltd. http://www.mbccs.com "Steven Cheng[MSFT]" wrote: > Hi Steven, > > How are you doing? Have you got any further idea on this issue or does > Walter's last reply helps you some? If there is anything else we can help, > please feel free to post here. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > This posting is provided "AS IS" with no warranties, and confers no rights . > >
Post Follow-up to this messageHi Steven, I think we may have some misunderstanding here, a VirtualPathProvider will not be used by a pre-compiled web site, but it should work if you don't pre-compile it. For example, use following VirtualPathProvider example: http://blogs.msdn.com/shahpiyush/ar...aster-Pages-amo ngst-Applications-by-Embedding-it-in-a-Dll_2E00_.aspx If you publish it to IIS, the VPP will not work. However if you delete all files in the published web site directory and copy all files from the "EmbedMasterPageWeb" directory to it, it should run successfully. Please note at this time, only the web forms, global.asax, etc. are not pre-compiled, they will be compiled when they're first visited. The VirtualPathProvider assembly, is still in compiled form, resides in bin subdirectory. Hope this helps. Regards, Walter Wang (wawang@online.microsoft.com, remove 'online.') Microsoft Online Community Support ======================================== ========== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ======================================== ========== This posting is provided "AS IS" with no warranties, and confers no rights.
Post Follow-up to this messageHi Walter, Thanks again for the reply - sometimes getting the problem across is difficult via a newsgroup. My problem is that I need to pre-compile - I have a web app that is redistributed and don't exactly want to give away the source-code. My point about the MSDN site is that MSDN is without-a-doubt a large and performance dependent application - I am about 99.9% sure that they'd precompile the sit e for deployment (I really can't imagine all the MSDN site source code sitting on their servers). So if MSDN is pre-compiled, how are they serving the MSD N library via VPP's? -- -Steven Berkovitz MBC Computer Solutions Ltd. http://www.mbccs.com "Walter Wang [MSFT]" wrote: > Hi Steven, > > I think we may have some misunderstanding here, a VirtualPathProvider will > not be used by a pre-compiled web site, but it should work if you don't > pre-compile it. > > For example, use following VirtualPathProvider example: > > [url]http://blogs.msdn.com/shahpiyush/archive/2007/03/09/Sharing-Master-Pages-amo[/ur l] > ngst-Applications-by-Embedding-it-in-a-Dll_2E00_.aspx > > > If you publish it to IIS, the VPP will not work. However if you delete all > files in the published web site directory and copy all files from the > "EmbedMasterPageWeb" directory to it, it should run successfully. > > Please note at this time, only the web forms, global.asax, etc. are not > pre-compiled, they will be compiled when they're first visited. The > VirtualPathProvider assembly, is still in compiled form, resides in bin > subdirectory. > > Hope this helps. > > > Regards, > Walter Wang (wawang@online.microsoft.com, remove 'online.') > Microsoft Online Community Support > > ======================================== ========== > When responding to posts, please "Reply to Group" via your newsreader so > that others may learn and benefit from your issue. > ======================================== ========== > > This posting is provided "AS IS" with no warranties, and confers no rights . > > > >
Post Follow-up to this messageHi Steven, I'm currently trying to find someone behind msdn2 to confirm how is it using VirualPathProvider. I'll keep you updated. Regards, Walter Wang (wawang@online.microsoft.com, remove 'online.') Microsoft Online Community Support ======================================== ========== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ======================================== ========== This posting is provided "AS IS" with no warranties, and confers no rights.
Post Follow-up to this messageHi Steven, I've contacted the team behind MSDN2 and they've confirmed that MSDN2 is not using per-compilaton, the pages are compiled on the fly (JIT). Please note since most of the msdn2 content are served from backend database using VirtualPathProvider, and with some mechanism of cache, the performance is not affected. For those normal web form with code behind, it's still need to provide the source code; for MSDN2, it's not an issue since the servers are private. I understand this is not possible for you since you don't want to release the source code to your clients. We're sorry for the inconvenience caused. I'll pass this information to our product group for future version's consideration. You're also welcome to submit your feedback at http://connect.microsoft.com/Main/c...?ContentID=2220 which is monitored by our product group directly. For now, I think you may try move most of your business logic into separate assembly and use this assembly from your web form's code behind. You can also obfuscate the assembly for further safety. Regards, Walter Wang (wawang@online.microsoft.com, remove 'online.') Microsoft Online Community Support ======================================== ========== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ======================================== ========== This posting is provided "AS IS" with no warranties, and confers no rights.
Post Follow-up to this messageHi Steven, I'm not sure if you've seen my last reply or not. I understand this is not a satisfying answer as you expected. I've tried all my best to see if there's any other workaround but it seems this is really by design behavior currently. Do you think it's possible to put the VPP in another separate web application and keep your other normal Web Forms in another? This way you can keep one web site per-compiled normally. Let me know if you think this approach is viable and you need further information on this. Regards, Walter Wang (wawang@online.microsoft.com, remove 'online.') Microsoft Online Community Support ======================================== ========== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ======================================== ========== This posting is provided "AS IS" with no warranties, and confers no rights.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.