473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to Update Remote Web Server with New Code-behind files

I work on a development server (Server A), and have a staging server (Server
B), where updated ASP.Net files from Server A are sent to. I noticed that
Server B will reflect changes made to .aspx files just by copying the new
files from Server A.

Server B only has the framework installed, and the project folder structure
is enormous (100MB+). I know that I can rebuild the project on Server A,
which has .Net Studio, and copy the new project to Server B, but this would
take a very long time for each instance a code-behind file is updated.We
tried restarting IIS each time a code-behind file is updated, but the
changes are still not reflected.

What is the best way to copy code-behind files (c#) to Server B, and have
the changes reflected?

Does this have to do with the "debug" attribute in the web.config file?
Server A has it set to "true" <compilation debug="true"/>, and Server B has
it set to "false" to improve performance.

Thanks,
Chris
Nov 18 '05 #1
4 2193
You need to recompile your project, and send the new DLL for the project
over to the other server. If you don't change any code in the codebehind,
but just the front end UI, then you can copy just the .aspx over.

The codebehind class is just text. It's the dll that has compiled executable
code based on this text that is actually needed.

"Chris" <re**********************@hotmail.com> wrote in message
news:uS*************@TK2MSFTNGP12.phx.gbl...
I work on a development server (Server A), and have a staging server (Server B), where updated ASP.Net files from Server A are sent to. I noticed that
Server B will reflect changes made to .aspx files just by copying the new
files from Server A.

Server B only has the framework installed, and the project folder structure is enormous (100MB+). I know that I can rebuild the project on Server A,
which has .Net Studio, and copy the new project to Server B, but this would take a very long time for each instance a code-behind file is updated.We
tried restarting IIS each time a code-behind file is updated, but the
changes are still not reflected.

What is the best way to copy code-behind files (c#) to Server B, and have
the changes reflected?

Does this have to do with the "debug" attribute in the web.config file?
Server A has it set to "true" <compilation debug="true"/>, and Server B has it set to "false" to improve performance.

Thanks,
Chris

Nov 18 '05 #2
CodeBehind source files do not need to be there in production, provided you
have compiled all of them into an assembly dll. (which is stored in the /bin
folder of your applications root). Infact the CodeBehind keyword in the
@Page directive is completely ignored by asp.net. (It's only a visual studio
attribute). You can get around this if you replace
CodeBehind="blah.aspx.cs" with src="blah.aspx.cs", but then it will be
compiled by the JIT compiler when the page is requested.

If this is not the issue and you actually want the codebehind files on
your second server, you can either use xcopy deployment, or "copy project"
from the project menu.

HTH,
--Michael

"Chris" <re**********************@hotmail.com> wrote in message
news:uS*************@TK2MSFTNGP12.phx.gbl...
I work on a development server (Server A), and have a staging server (Server B), where updated ASP.Net files from Server A are sent to. I noticed that
Server B will reflect changes made to .aspx files just by copying the new
files from Server A.

Server B only has the framework installed, and the project folder structure is enormous (100MB+). I know that I can rebuild the project on Server A,
which has .Net Studio, and copy the new project to Server B, but this would take a very long time for each instance a code-behind file is updated.We
tried restarting IIS each time a code-behind file is updated, but the
changes are still not reflected.

What is the best way to copy code-behind files (c#) to Server B, and have
the changes reflected?

Does this have to do with the "debug" attribute in the web.config file?
Server A has it set to "true" <compilation debug="true"/>, and Server B has it set to "false" to improve performance.

Thanks,
Chris

Nov 18 '05 #3
So all that's needed on Server B is to overwrite the existing
bin\projectname.dll with the updated one from Server A?

Great.
Thanks
"Michael Ramey" <raterus@localhost> wrote in message
news:eX**************@TK2MSFTNGP11.phx.gbl...
CodeBehind source files do not need to be there in production, provided you have compiled all of them into an assembly dll. (which is stored in the /bin folder of your applications root). Infact the CodeBehind keyword in the
@Page directive is completely ignored by asp.net. (It's only a visual studio attribute). You can get around this if you replace
CodeBehind="blah.aspx.cs" with src="blah.aspx.cs", but then it will be
compiled by the JIT compiler when the page is requested.

If this is not the issue and you actually want the codebehind files on
your second server, you can either use xcopy deployment, or "copy project"
from the project menu.

HTH,
--Michael

"Chris" <re**********************@hotmail.com> wrote in message
news:uS*************@TK2MSFTNGP12.phx.gbl...
I work on a development server (Server A), and have a staging server

(Server
B), where updated ASP.Net files from Server A are sent to. I noticed that Server B will reflect changes made to .aspx files just by copying the new files from Server A.

Server B only has the framework installed, and the project folder

structure
is enormous (100MB+). I know that I can rebuild the project on Server A, which has .Net Studio, and copy the new project to Server B, but this

would
take a very long time for each instance a code-behind file is updated.We
tried restarting IIS each time a code-behind file is updated, but the
changes are still not reflected.

What is the best way to copy code-behind files (c#) to Server B, and have the changes reflected?

Does this have to do with the "debug" attribute in the web.config file?
Server A has it set to "true" <compilation debug="true"/>, and Server B

has
it set to "false" to improve performance.

Thanks,
Chris


Nov 18 '05 #4
so easy isn't it :)

"Chris" <re**********************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
So all that's needed on Server B is to overwrite the existing
bin\projectname.dll with the updated one from Server A?

Great.
Thanks
"Michael Ramey" <raterus@localhost> wrote in message
news:eX**************@TK2MSFTNGP11.phx.gbl...
CodeBehind source files do not need to be there in production, provided

you
have compiled all of them into an assembly dll. (which is stored in the

/bin
folder of your applications root). Infact the CodeBehind keyword in the
@Page directive is completely ignored by asp.net. (It's only a visual

studio
attribute). You can get around this if you replace
CodeBehind="blah.aspx.cs" with src="blah.aspx.cs", but then it will be
compiled by the JIT compiler when the page is requested.

If this is not the issue and you actually want the codebehind files on
your second server, you can either use xcopy deployment, or "copy project"
from the project menu.

HTH,
--Michael

"Chris" <re**********************@hotmail.com> wrote in message
news:uS*************@TK2MSFTNGP12.phx.gbl...
I work on a development server (Server A), and have a staging server

(Server
B), where updated ASP.Net files from Server A are sent to. I noticed that Server B will reflect changes made to .aspx files just by copying the new files from Server A.

Server B only has the framework installed, and the project folder

structure
is enormous (100MB+). I know that I can rebuild the project on Server A, which has .Net Studio, and copy the new project to Server B, but this

would
take a very long time for each instance a code-behind file is updated.We tried restarting IIS each time a code-behind file is updated, but the
changes are still not reflected.

What is the best way to copy code-behind files (c#) to Server B, and have the changes reflected?

Does this have to do with the "debug" attribute in the web.config file? Server A has it set to "true" <compilation debug="true"/>, and Server

B has
it set to "false" to improve performance.

Thanks,
Chris



Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: addi | last post by:
All, Can someone help me with the following SQL and help me write it in an OPENQUERY format. I am running the following code from a SQL Server 7 box, trying to update a table in an Oracle Linked...
2
by: chris.ciotti | last post by:
Greetings - I'm using an Access front end to a SQL Server (2000) databas­e. Via several steps, I create a temp table and manipulate the data­ in it. I want to update the backend with this...
3
by: markydev | last post by:
Hi, I'm using sql server 2000 sp4. I've 2 databases linked, an instance and my local. I'm getting two different errors when trying to update the remote table (local server) from the instance....
5
by: Klemens | last post by:
I get SQL30090 reason 18 by trying to do an insert in a federated table and an update in a local table in one transaction Do I have to change some settings to get done or ist this not possible by...
2
by: André Heuer | last post by:
Hi, i want to write a .net class that can update my ip address at the dyndns service (http://www.dyndns.org). When I open the page...
0
by: Vijay Balki | last post by:
I am fetching data in DataSet - myDataSet, from a remote database using a Web Service in my VB.NET client..Once I fetch it I store the data in XML file (myXMLFile) using the WriteXML method of the...
6
by: cj | last post by:
I have to take all records in a SQL db that have an empty val_code field and process and update the records with a code number in the val_code field. The processing is done by sending select info...
0
by: gshawn3 | last post by:
Hi, I am having a hard time creating a Trigger to update an Oracle database. I am using a SQL Server 2005 Express database on a Win XP Pro SP2 desktop, linked to an Oracle 10g database on a...
1
by: VikingDK | last post by:
Hi all I recently updated my DB2 Enterprise Server from fixpak 3 to fixpak 4. Everything seemed to go smoothly, but a few hours after the update, I found out that I could no longer connect to our...
0
by: varathasiva | last post by:
Hi, I have delphi database application through delphi7 database postgresSQL8.1 and zeos6.1.I have two postgreSQL8.1 database server.One is windows server working local network another one is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.