Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do I need to upload .aspx.cs to remote server?

Status
Not open for further replies.

shaunacg

Programmer
Aug 1, 2003
71
GB
Hi,

I need to reduce my disk space useage on the remote server. If I upload the bin directory and the .aspx pages is that all is needed? Do I need to also upload the .aspx.cs and .aspx.resx to the remote server?

Thanks.

shaunacg
 
Once you compile your code all you need is the Bin directory with dll file(s), and your aspx files.

Other files you may need to move:
.js
.txt
.rpt
.xsd

You won't need to post the aspx.vb, aspx.cs, aspx.resx files to the server.


Jason Meckley
Database Analyst
WITF
 
Hi, i've written a little batch file for you that helps you copy only the files u need. U can adjust it in any way you want, exluding or including any specific files for you project, ofcourse you can also pass the source and destination directory as parameters but i just wanted something i could doubleclick on :)


Code:
@Echo Off
REM ########################################################################################
REM # Author : edward de leau, 2004
REM #
REM # This Batch File copies the DEVELOPER Website to the PRODUCTION Website
REM # It may also be handy for other .NET Website in modified form.
REM # 
REM ########################################################################################
REM #
REM # Exclude the following list of files + dirs to copy
REM # We create a temporary file called exclude.txt with the exclusions in it
REM # 
REM # All c-sharp source files, we do not need them in production

      echo .cs > exclude.txt

REM # All temporary files

      echo .tmp >> exclude.txt

REM # All Log Files

      echo .log >> exclude.txt

REM # All Visual Studio project related information 

      echo .sln >> exclude.txt
      echo .suo >> exclude.txt
      echo .csproj >> exclude.txt      
      echo .resx >> exclude.txt
      echo .vsdisco >> exclude.txt
      echo .webinfo >> exclude.txt
      echo .pdb >> exclude.txt

REM # All Rational XDE related files

      echo .mdx >> exclude.txt
      echo .wdx >> exclude.txt
      echo .ratl >> exclude.txt
      echo .idx >> exclude.txt

REM # All Executables

      echo .bat >> exclude.txt
      echo .exe >> exclude.txt

REM # All Frontpage Extensions Dirs

      echo \_derived >> exclude.txt
      echo \_private >> exclude.txt
      echo \_vti_cnf >> exclude.txt
      echo \_vti_pvt >> exclude.txt
      echo \_vti_script >> exclude.txt
      echo \_vti_txt >> exclude.txt
      
REM # All Documentation directories

      echo \doc >> exclude.txt

REM # Some Specific directories which we do NOT want to copy to production (just examples)

      echo \Test >> exclude.txt
      echo \Copy of >> exclude.txt
      echo \RichTextBoxOld >> exclude.txt

REM #
REM ########################################################################################
REM #
REM # X - copies the Site with the following options, please do not Modify or whatever.
REM #
REM # /Exclude : the files and directories herein are excluded
REM # /S : Copies directories and subdirectories except empty ones.
REM # /D : Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
REM # /Q : Does not display file names while copying.
REM # /K : Copies attributes. Normal Xcopy will reset read-only attributes
REM # /H : Copies hidden and system files also 
REM # /I : If destination does not exist and copying more than one file, assumes that destination must be a directory
REM #
    @echo ON   
    xcopy /EXCLUDE:exclude.txt "\\bla\d$\blabla\bla\*.*" "\\destination\somedir" /s /D /K /H /I /Q
    @echo OFF
REM #
REM # Delete the exceptions file
REM # 
    DEL exclude.txt

REM #
REM # Delete The documentation xml files in the \bin directory
REM # 
    DEL "\\destination\somedir\bin\*.xml"
    DEL "\\destination\somedir\somethingelse.net"

REM #
REM # Copy the *.css file since we excluded it with .cs :)
REM #
        xcopy "\\sourcedir\bla\*.css" "\\destination\somedir" /D /K /H /I /Q

REM #
REM # Let pause the result screen so the user can see the result
REM #
    pause    
REM ########################################################################################
REM # 
REM ########################################################################################

Edward@de-leau.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top