VirtualPathProviders & precompiled/deployed website

G

Guest

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/issues/05/02/InsideMSDN/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 their
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.
 
W

Walter Wang [MSFT]

Hi 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/archive/2005/11/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 ([email protected], 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.
 
S

Steven Cheng[MSFT]

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.
 
G

Guest

Hi Steven,

It seems that this just isn't possible - which I still don't understand as
MSDN claims to use it...
 
W

Walter Wang [MSFT]

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:

http://blogs.msdn.com/shahpiyush/archive/2007/03/09/Sharing-Master-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 ([email protected], 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.
 
G

Guest

Hi 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 site
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 MSDN
library via VPP's?
 
W

Walter Wang [MSFT]

Hi 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 ([email protected], 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.
 
W

Walter Wang [MSFT]

Hi 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/content/content.aspx?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 ([email protected], 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.
 
W

Walter Wang [MSFT]

Hi 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 ([email protected], 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top