What Gets Deployed?

  • Thread starter Thread starter Wayne Wengert
  • Start date Start date
W

Wayne Wengert

I created a VB ASP.NET solution in VSNET 2003. It works fine in the IDE. As
per the instructions, I used Project/Copy Project to make a copy of all
required files (I used the FrontPage option). I then FTP'd all of those
files and directories to a virtual directory on my ISP account. In looking
through the contents, I don't see my Form1.aspx.vb file? I suspect the
code-behind is compiled into some other file?

I am currently working with the developer of a 3rd party grid that is used
in my project to resolve some problems, and he is all excited over the fact
that the Form1.aspx.vb file isn't there. I don't think that is relevant
since I can see that at least some of my code runs?

Can anyone educate me on what gets distributed?

TIA

Wayne
 
Typically, you don't want or need the .vb / .cs etc files on a production
server. Any code files should have been compiled into the library or
executable used for your web application; these files are located within the
project's bin directory. Other files, such as the .aspx, .ascx etc. are
considered content of the project and are also copied. Obviously, any VB/C#
server side code within the content pages will be compiled on the server as
needed.

So, as a rule of thumb, you wouldn't expect to see .vb/.cs files (or indeed
..pdb or other debug files) on a web server as the code has been compiled.
In this respect, I would suggest you are right and your over excited friend
is wrong :)

A simple exercise if you have VS.NET is to select a file in the solution
explorer tree and look at the properties - the "Build Action" entry denotes
what is done with the file. Content is simply copied; Compile is just that;
Embedded Resource is auxilary info chucked into the assemblies etc.

K.
 
Kev;

Thanks for the helpful reply.

Wayne

Kev Sherratt said:
Typically, you don't want or need the .vb / .cs etc files on a production
server. Any code files should have been compiled into the library or
executable used for your web application; these files are located within the
project's bin directory. Other files, such as the .aspx, .ascx etc. are
considered content of the project and are also copied. Obviously, any VB/C#
server side code within the content pages will be compiled on the server as
needed.

So, as a rule of thumb, you wouldn't expect to see .vb/.cs files (or indeed
.pdb or other debug files) on a web server as the code has been compiled.
In this respect, I would suggest you are right and your over excited friend
is wrong :)

A simple exercise if you have VS.NET is to select a file in the solution
explorer tree and look at the properties - the "Build Action" entry denotes
what is done with the file. Content is simply copied; Compile is just that;
Embedded Resource is auxilary info chucked into the assemblies etc.

K.
 
Back
Top