Re: simple question

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: S. Justin Gengo (sjgengo_at_aboutfortunate.com)
Date: 02/20/04


Date: Fri, 20 Feb 2004 10:00:46 -0600

Allan,

First, you shouldn't have ANY .vb files out on your production server. All
the code-behind in all of your pages gets compiled into the application's
main .dll file.

Here's the best way I've found to optimize your application and get just the
files you need for production:

1. Set your application output to: Release

2. In your web.config file make sure to set debug="false"
    <compilation defaultLanguage="vb" debug="false" />

3. In the solution explorer window of Visual Studio.Net
    select your web project by left clicking on it once.

4. In the application menu click: Project - Copy Project

5. In the Copy Project window that opens the recommended
    web access method is "File Share".

6. Set to: "Only files needed to run this application"
    in the "Copy" section

7. This will make a copy of your application (note the
    destination) for deployment to your production server.

Notes:

If you make a visual only change to your application. (i.e. You move the
location of a control in a .aspx file or change text placed right in the
html you just need deploy that .aspx file to have your change take effect.
Any changes to an object's properties or to the application's code behind
require the .dll to be recompiled and deployed.

If all you've changed is the code behind and no .aspx pages have been
changed (i.e. no objects added or subtracted from the display of a page.)
then all you need to do to deploy the applcation changes is copy and paste
the main application.dll.

If you've changed the display page and made a code behind change (i.e. added
an object) then just deploy the .aspx file(s) that changed and the main.dll.

Most changes that aren't major will usually only require you to upload two
or three files to the web server at any given time.

I hope this helps.

-- 
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
                             Nietzche
"Allan Rojas" <ndrtkr@thecqgl.com> wrote in message
news:%23yZsUO89DHA.3068@tk2msftngp13.phx.gbl...
> Hi there, i'm having this problem and i hope someone can help me out.
>
> We have this WebApplication in ASP.NET; we work on it in our local
> webserver. When we're done, we must upload the application to the FTP
> located in our hosting location.
>
> The first time it was a full-upload of the project files, and a minor
change
> to the Web.Config in order to access the right databse. But now, if i make
a
> MINOR change to a code-behind file, how do i replicate the changes without
> having to recompile the whole project and make the whole process again?
>
> * I though that if i replaced the .cs / .vb file and reloaded the
> application, it would detect the change and recompile it automatically...
> but it won't work.
>
> * Then i though that if i deleted the DLL file in the BIN subdirectory, it
> would recompile and generate it... but it won't work either.
>
> * Finally, i though that if i deleted the aspx files and tried to access
the
> application, the server would realize it was no longer available; and if i
> added the files again and tried to access it again, it would recompile
it...
> but i was just dreaming...
>
> I'm just starting to work with ASP.NET and i simply can't believe that the
> only way i can get my MINOR change reflected is by recompiling the WHOLE
> application or replacing the pre-compiled DLL ...
>
> Any suggestion or tip ? Thanks in advance.
>
>


Relevant Pages

  • Re: simple question
    ... you shouldn't have ANY .vb files out on your production server. ... > html you just need deploy that .aspx file to have your change take effect. ... we must upload the application to the FTP ... >> having to recompile the whole project and make the whole process again? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SQL Server connection string works with IIS 5.1 but not IIS 6 in ASP.NET
    ... if you stay with the code-behind model (which is the default in Visual ... then you will need to recompile the DLL if you make changes ... then it creates in-line code (at the top of the aspx file). ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Rebuilding and deploying DLL everytime I change a single aspx page?
    ... Are there any issues with copying over the existing DLL on our ... production server with a new one? ... Should we restart IIS everytime we copy over a new DLL, ... code-behind, you'll have to recompile. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Migration of ASP Application from W2K to Win2003
    ... I will take your advice and recompile ALL VB6 DLLs and then post an update ... > for example, I've seen interop start with a native IIS API, use a .Net ... > removes IIS from the picture and instead focuses on the COM interop. ... > a) the VB6 DLL which is called from the classic ASP code works fine, ...
    (microsoft.public.windows.server.security)
  • Re: DLL exporting with __declspec or .DEF file?
    ... implicitly linked DLL changes. ... considering converting our library code to a DLL. ... implicit linking seems to be the simpliest to implement but I'm ... recompile the EXE's that implicitly link to the export lib. ...
    (microsoft.public.vc.language)