Update a single page

Last post 05-09-2008 6:55 PM by hongping. 15 replies.

Sort Posts:

  • Update a single page

    05-08-2008, 12:41 PM
    • Loading...
    • pthalacker
    • Joined on 05-06-2008, 5:18 PM
    • Posts 9

    Is there a way to compile and update a single page in a web site and have it use the existing app_code.dll, without having to put out all the pages and their associated renamed dlls?  Publish Web Site won't work for me.  We have a slew of dynamic content on the web site that is not in the development environment.  I just change two line of code in a code-beside file and I only want to impact the web site with that change.  Is that not possible

    pamela

     

     

     

     

     

     

     

  • Re: Update a single page

    05-08-2008, 1:18 PM
    • Loading...
    • allanhorwitz
    • Joined on 04-10-2008, 1:45 PM
    • Philadelphia, PA
    • Posts 295

    You can create a web site that deploys with the code behind files, rather than compiling into a dll. I used to build my apps that way when ASP.Net first came out. As far as doing exactly what your asking for though, I have no suggestions.

    Allan Horwitz
  • Re: Update a single page

    05-08-2008, 1:36 PM
    • Loading...
    • pthalacker
    • Joined on 05-06-2008, 5:18 PM
    • Posts 9

    Thanks for the quick response even though it wasn't what I wanted to hear.  Just out of curiosity, you say you used to deploy that way when ASP.NET came out.  What caused you to change to compiled sites?

    pamela

  • Re: Update a single page

    05-08-2008, 1:42 PM
    • Loading...
    • allanhorwitz
    • Joined on 04-10-2008, 1:45 PM
    • Philadelphia, PA
    • Posts 295

    pthalacker:

    Thanks for the quick response even though it wasn't what I wanted to hear.  Just out of curiosity, you say you used to deploy that way when ASP.NET came out.  What caused you to change to compiled sites?

    pamela

    Microsoft introduced Web Application technology. We found them to be easier to deploy since none of the .cs pages had to be copied out.

    Allan Horwitz
  • Re: Update a single page

    05-08-2008, 1:45 PM
    • Loading...
    • allanhorwitz
    • Joined on 04-10-2008, 1:45 PM
    • Philadelphia, PA
    • Posts 295

    pthalacker:
    We have a slew of dynamic content on the web site that is not in the development environment.  I just change two line of code in a code-beside file and I only want to impact the web site with that change.  Is that not possible


    I would set-up a test site with the production data and try some different things. Maybe you can just xcopy deploy your page with it's code behind and everything will work fine.
    Allan Horwitz
  • Re: Update a single page

    05-08-2008, 2:00 PM
    • Loading...
    • pthalacker
    • Joined on 05-06-2008, 5:18 PM
    • Posts 9

    I have to use ftp rather than xcopy.  I already tried just replacing the single page with its code-behind and it complained that the version of App_Code.dll wasn't up to date.  I tried copying an aspx page with a reference to its uncompiled .vb file along with the source file and it still insisted on finding its compiled source, even without the reference.  So I have to assume that App_Code.dll has some internal map that references all the pages to their compiled source.  It appears that if we want any compilation at all, we have to deploy all compiled source and everything that references it  whenever we make a change.

     pamela

  • Re: Update a single page

    05-08-2008, 2:06 PM
    • Loading...
    • allanhorwitz
    • Joined on 04-10-2008, 1:45 PM
    • Philadelphia, PA
    • Posts 295

    pthalacker:
    I have to use ftp rather than xcopy. 
     

    Ftp and xcopy is pretty much the same thing.

    pthalacker:
    I already tried just replacing the single page with its code-behind and it complained that the version of App_Code.dll wasn't up to date.  I tried copying an aspx page with a reference to its uncompiled .vb file along with the source file and it still insisted on finding its compiled source, even without the reference.  So I have to assume that App_Code.dll has some internal map that references all the pages to their compiled source.  It appears that if we want any compilation at all, we have to deploy all compiled source and everything that references it  whenever we make a change.

    Well, that is basically what I would have tried also. Maybe one of the Forum Moderators will have a suggestion in a few days.

    Allan Horwitz
  • Re: Update a single page

    05-08-2008, 2:13 PM
    • Loading...
    • hongping
    • Joined on 11-02-2006, 5:42 PM
    • Posts 327
    • AspNetTeam

    How was the original web site deployed? If you used aspnet_compiler with -fixednames, you might be able to just replace the single assembly corresponding to that page.

    http://msdn.microsoft.com/en-us/library/ms229863(vs.80).aspx

     

    ==============================================
    If you get the answer to your question, please mark it as the answer.
  • Re: Update a single page

    05-08-2008, 3:41 PM
    • Loading...
    • pthalacker
    • Joined on 05-06-2008, 5:18 PM
    • Posts 9

    As I said in the previous post, that didn't work.  The new version of the compiled code file wanted its associated newer version of app_code.dll

     pamela

  • Re: Update a single page

    05-08-2008, 3:49 PM
    • Loading...
    • hongping
    • Joined on 11-02-2006, 5:42 PM
    • Posts 327
    • AspNetTeam

    So, how was the original web site deployed?

    ==============================================
    If you get the answer to your question, please mark it as the answer.
  • Re: Update a single page

    05-08-2008, 6:49 PM
    • Loading...
    • pthalacker
    • Joined on 05-06-2008, 5:18 PM
    • Posts 9

    You had to ask. We upgraded from asp.net 1.1 to 2.0 on a test site (not live) and tweaked it for a couple of weeks before we pointed the live host header to the new site.  I inherited this site two months ago and it still has asp pages from 6 years ago running vbscript that reads and writes data.  It is overdue for an overhaul, but we have two other sites with brand new designs and I am going to create a model for the things we do while building them from scratch.  By then, this one will probably have a new design.

    pamela

  • Re: Update a single page

    05-08-2008, 7:06 PM
    • Loading...
    • hongping
    • Joined on 11-02-2006, 5:42 PM
    • Posts 327
    • AspNetTeam

    I was actually asking about the steps you took to deploy the web site. Did you use the Publish feature in VS? And If so, which options did you choose (eg updatable, fixed naming)? If you used aspnet_compiler, what arguments did you use?

    Note that by default each web content folder gets compiled into a single dll, so if you did not use fixed naming, you might have to deploy the dll corresponding to the affected dll.

    One possible way to try to workaround the app_code.dll problem you mentioned might be to create a new website, and then put the compiled app_code.dll into bin. Then compile and redeploy only the dll corresponding to the pages.

    ==============================================
    If you get the answer to your question, please mark it as the answer.
  • Re: Update a single page

    05-09-2008, 9:40 AM
    • Loading...
    • pthalacker
    • Joined on 05-06-2008, 5:18 PM
    • Posts 9

    >Did you use the Publish feature in VS?

    Yes and I chose updatable and fixed naming

    >One possible way to try to workaround the app_code.dll problem you mentioned might be to create a new website, and then put the compiled app_code.dll into bin

    Maybe I am misunderstanding you, but I think that is what I tried.  When I put the new version of app_code.dll and just the page I wanted with its dll, the app complained that it couldn't find a dll from the new set that was compiled with the new app_code.dll.  I believe all the code is tied together in some way and the dlls go out as a full set or not at all. I have read several articles that seem to me to support that belief.

    >Then compile and redeploy only the dll corresponding to the pages

    I wasn't able to figure out how to compile just one folder.

  • Re: Update a single page

    05-09-2008, 9:52 AM
    Answer
    • Loading...
    • allanhorwitz
    • Joined on 04-10-2008, 1:45 PM
    • Philadelphia, PA
    • Posts 295

    Here is a thought. It seems to me that you are spinning your wheels here and trying to accomplish something that just is not possible. If you could figure out a way to move your code into a simple website, that deploys without being compiled, you will be fine. In other words, no dll. Just .aspx and .cs pages. I used to deploy my ASP.Net web sites just like that, and changing a single code behind was always fine.

    Allan Horwitz
  • Re: Update a single page

    05-09-2008, 9:55 AM
    • Loading...
    • pthalacker
    • Joined on 05-06-2008, 5:18 PM
    • Posts 9

    allanhorwitz:

    Here is a thought. It seems to me that you are spinning your wheels here and trying to accomplish something that just is not possible. If you could figure out a way to move your code into a simple website, that deploys without being compiled, you will be fine. In other words, no dll. Just .aspx and .cs pages. I used to deploy my ASP.Net web sites just like that, and changing a single code behind was always fine.

    Thanks.  I think I understand my options.  I appreciate everyone's assistance.

    pamela

Page 1 of 2 (16 items) 1 2 Next >