Publish web site overwriting all files all the time

Discussion in 'ASP .Net' started by PokerMan, Apr 5, 2007.

  1. PokerMan

    PokerMan Guest

    HI

    When i publish my site, it overwrites all files. but when i have some large
    files included such as mp3s. It overwrites these and even tho i havent
    touched them it reuploads all of them. Anyway i can set it to not do this
    for specific files?

    Thanks
     
    PokerMan, Apr 5, 2007
    #1
    1. Advertisements

  2. No unfortunately not. The publish feature basically writes out a new copy of
    the entire Web site and then pushes the whole thing up to the server. It's
    ugly to say the least especially with stock projects. There's really no good
    workaround for this because the ASP.NET compiler wipes the timestamps from
    the files so there's no way to even manually diff the files based on dates.
    You can manually do it via FTP off the output files.

    There are some ways that can make this easier. One is Web Deployment
    projects which can basically compile your entire code of the site into a
    single assembly making update deployment a bit easier. Or you can use Web
    Application Projects (part of SP1 of Visual Studio) which does codebehind
    compilation. But neither of these solutions really offer you a dynamic
    publish feature - you still have to manually manage updates or suffer
    through uploading the same files even if they haven't changed.

    I wrote an article on this topic some time ago that explains how all this
    works and shows a few of the differences, but be forewarned it's not a quick
    read <s>...

    http://www.west-wind.com/presentations/AspNetCompilation/AspNetCompilation.asp


    Hope this helps,

    +++ Rick ---
     
    Rick Strahl [MVP], Apr 6, 2007
    #2
    1. Advertisements

  3. PokerMan

    PokerMan Guest

    Thanks Rick.



     
    PokerMan, Apr 9, 2007
    #3
  4. PokerMan

    Mark Rae Guest

    WDP allows you to exclude files and/or folders by using the ExcludeFromBuild
    tag - I do this all the time...
     
    Mark Rae, Apr 9, 2007
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.