VirtualPathProviders & precompiled/deployed website

Discussion in 'ASP .Net' started by =?Utf-8?B?U3RldmVuIEJlcmtvdml0eg==?=, Jun 29, 2007.

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

    --
    -Steven Berkovitz
    MBC Computer Solutions Ltd.
    http://www.mbccs.com
    http://www.orderdynamics.com
    =?Utf-8?B?U3RldmVuIEJlcmtvdml0eg==?=, Jun 29, 2007
    #1
    1. Advertising

  2. 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 (, 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.
    Walter Wang [MSFT], Jul 2, 2007
    #2
    1. Advertising

  3. 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.
    Steven Cheng[MSFT], Jul 5, 2007
    #3
  4. Hi 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.
    >
    >
    =?Utf-8?B?U3RldmVuIEJlcmtvdml0eg==?=, Jul 5, 2007
    #4
  5. 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 (, 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.
    Walter Wang [MSFT], Jul 9, 2007
    #5
  6. 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?
    --
    -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:
    >
    > 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 (, 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.
    >
    >
    >
    >
    =?Utf-8?B?U3RldmVuIEJlcmtvdml0eg==?=, Jul 9, 2007
    #6
  7. 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 (, 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.
    Walter Wang [MSFT], Jul 10, 2007
    #7
  8. 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 (, 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.
    Walter Wang [MSFT], Jul 11, 2007
    #8
  9. 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 (, 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.
    Walter Wang [MSFT], Jul 13, 2007
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Niiranen Miika

    Parameterized precompiled modules

    Niiranen Miika, Oct 7, 2004, in forum: VHDL
    Replies:
    1
    Views:
    533
    Jim Lewis
    Oct 7, 2004
  2. Steve Franks
    Replies:
    11
    Views:
    27,574
    JeanCastNet
    Jun 10, 2010
  3. Replies:
    0
    Views:
    391
  4. Sanjay Pais
    Replies:
    1
    Views:
    2,365
    Sanjay Pais
    Dec 20, 2005
  5. Replies:
    2
    Views:
    337
Loading...

Share This Page