Results 1 to 8 of 8

Thread: [2005] publish question

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    [2005] publish question

    I know this is a bit of a nub question, but I mostly program WinForms, and the few ASP.NET projects I have are still in 1.1.

    In ASP.NET 2.0, when I select to Publish a site (via FTP) and Visual Studio takes care of the entire process except for me putting in the FTP password, that is compiling the site in "release" mode right?

    I would assume VS would be smart enough to know that if you are publishing the site to an FTP, it should be compiled as the final release product, but I just want to make sure, since things are a bit different than ASP.NET 1.1.

  2. #2
    Hyperactive Member kayos's Avatar
    Join Date
    Apr 2004
    Location
    Largo, Florida
    Posts
    306

    Re: [2005] publish question

    When you publish an ASP.NET 2.0 app, you put all of your *.aspx and code files into the web directory on the FTP server. ASP.NET 2.0 on the webserver will compile your project using the Just In Time compiler on the server. This will create your *.dlls in a temp directory for future use of the site. The bottom line is that all your files go to the webserver, codebehind and all.

    There are other options such as Web Application Projects, which is a little more like .NET 1.1 where as all codebehind is compacted into a *.dll. Then there is also Web Deployment Projects which will do the same and give an installer for the web.

    The real thing you have to look at is if you can deploy the codebehind or not. if yes, then option 1 just uploading will work for you. If not then you will have to look into Web Application Project or Web Deployment Projects as an alternative.


    If this post helps, please RATE MY POST!

    Using Visual Studio 2005 SE

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] publish question

    You'll have options in the Publish dialog box, and you should be able to specify whether all files go in or just some. That'll precompile the site for you and the DLLs are then copied over along with placeholder .aspx pages, and no codebehind. An interesting fact I often like to mention in order to appear smarter than I really am is that you can actually delete those .aspx files and the website will still run as long as the DLLs are in place.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] publish question

    PS: Yes, Visual Studio is smart.

  5. #5

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] publish question

    Quote Originally Posted by mendhak
    You'll have options in the Publish dialog box, and you should be able to specify whether all files go in or just some. That'll precompile the site for you and the DLLs are then copied over along with placeholder .aspx pages, and no codebehind. An interesting fact I often like to mention in order to appear smarter than I really am is that you can actually delete those .aspx files and the website will still run as long as the DLLs are in place.
    Mend, maybe I am missing something simple (I am so used to winforms development), but I don't see any options that sound anything like what you said.

    When I click on publish, the only screen I get is the one below. I don't see any other options anywhere.
    Attached Images Attached Images  

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] publish question

    Perhaps I was too verbose. Just that should be enough.

    If you uncheck that checkbox, you should get the placeholder pages as I mentioned.

  7. #7

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] publish question

    Well the main problem I am having is the messagebox that says "publishing will delete everything in the destination", which of course I have to say yes to for the publish to continue. That is fine, except it actually deletes my entire site.

    So for example, if my ASP.NET 2.0 application (which is the only actual site content on the server, aka its the root application/site) is sitting on the server like it is now, but I also have some other directory, lets say its user uploaded files, and I publish my site, it deletes that directory, even though it has no naming conflicts with my ASP.NET site.

    So basically what I am getting at, is there a way to use the publish feature, but not have it delete directories/files that are not part of the site itself?

    I know I can use the ASP 1.x route and just FTP the file contents up manually, but I like the publish feature and would like to use it if possible.

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] publish question

    That's by design, I'm afraid.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width