473,396 Members | 1,812 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,396 software developers and data experts.

Why deployment server needs cs files?

I have a few user controls in ascx files. I copied these files to the
deployment server. However the server gives error message that the code
behind (cs) are missing. I thought all cs files are compiled in the dll.

The web pages work if I copied the cs files. Why do I need to copy them
over?

John Dalberg
Feb 1 '07 #1
2 2150
On Feb 1, 7:58 am, nos...@nospam.sss (John Dalberg) wrote:
I have a few user controls in ascx files. I copied these files to the
deployment server. However the server gives error message that the code
behind (cs) are missing. I thought all cs files are compiled in the dll.

The web pages work if I copied the cs files. Why do I need to copy them
over?
You should (I assume you're using Visual Studio 2005 here)
Right Click your Web Project and choose "Build deployment" (or release
or something)
Then you get to choose a folder where you'r web site will appear in a
BUILT version.
Browse to that folder and COPY that content into the Virtual Directory
of your web server on your server environment and
you should have a working website!

If you copy the .cs files and does it the way you're doing it the site
will run a houndrer times SLOWER since you're not taking advantage of
the precompilation options in Asp.Net 2.0...

..t

--
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!

Feb 1 '07 #2
Hi,

John Dalberg wrote:
I have a few user controls in ascx files. I copied these files to the
deployment server. However the server gives error message that the code
behind (cs) are missing. I thought all cs files are compiled in the dll.

The web pages work if I copied the cs files. Why do I need to copy them
over?

John Dalberg
The deployment model changed in 2.0. You know have three options:

- Copy the ASCX, ASPX, ASMX files and also the CS files to the server.
The code-behind will be compiled on demand. This can be interesting for
web sites where parts of the site change often. This avoids recompiling
the whole site. Note that the code is protected because (normally), the
ASP.NET server refuses to serve code files.

- Publish the site using the "Build / Publish" menu. This precompiles
the website, and then deploys only the files needed to the web server.

- Use the web application project (WAP) template for VS2005. It's the
best suited model for web applications (as opposed to websites), but
it's also great for websites IMHO. It is closer to the 1.1 model, and
you have full control on the assembly, and on what gets published.

The WAP can be installed from here:
http://webproject.scottgu.com/

However, the WAP is included in VS2005 SP1, so you must uninstall it
before you install the SP1.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Feb 1 '07 #3

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

Similar topics

5
by: Arun Bhalla | last post by:
I'm working with VS.NET 2003 and .NET 1.1 (not SP1) on Windows XP SP1. My application is using the Windows Installer Bootstrap. (I may have also installed a module which detects requirements (.NET...
3
by: Steve Brecher | last post by:
VS.NET help on deployment indicates that, while using a deployment project requires administrative access to IIS, " we recommend deploying your project in most cases, because it allows you to take...
4
by: Matt Anderson | last post by:
When I use Xcopy to deploy my changes to IIS, it seems to drop the user connections; i.e., empties out their Session variables, etc. I thought ASP.NET was supposed to use shadow deployment and...
2
by: Charl | last post by:
Hello, I’ve got a very strange but big deployment problem. I’ve written an asp.net application with an usercontrol on a webform. The usercontrol reads all picture names out of a mssql...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
1
by: Dominick Baier | last post by:
Hi, the account under which the asp.net worker process is running has to have NTFS rights to the files/directories you are writing under iis5/5.1 this is usually a account called ASPNET ...
2
by: Bill Nguyen | last post by:
I ran into this error trying to run an app from Publish.htm. I can't find what is wrong with the deployment. Thanks a million Bill -------- PLATFORM VERSION INFO
1
by: Gene | last post by:
I would like to know if the following is even possible with the visual studio.net Setup and Deployment project. 1. During the deployment after creation of application directory the setup needs...
10
by: =?Utf-8?B?UHVuaXQgS2F1cg==?= | last post by:
Hi, I am developing a windows application in VS.NET 2005. The application is database driven and I need to deploy it on a client's pc. How should I go about developing such an application. I...
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:
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.