 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

April 17th, 2012, 04:16 PM
|
|
Authorized User
|
|
Join Date: Sep 2011
Posts: 41
Thanks: 3
Thanked 4 Times in 3 Posts
|
|
Compiled /Bin files
Hi,
got another question. in the past, I set up project using Web Application Project. After going through almost the your entire book, I discovered that Profile is not supported under Web Application Project; ergo, my latest project, I am using Web Site Project.
In the past, when I went live, I simply copied the files using FTP.
Post-live, when I made code changes, instead of copying all the files again, I was able to simply copy the .dll and .pdb files in the /bin directory. However, and I'm not sure if this is because I'm using Web Site project, I do not see my project dll and pdb files in the /bin directory. Therefore, whenever I make code behind changes to one file, I have to upload ALL the files again because I don't know where the .dll and .pdb files are.
Does the Web Site Project hide the .dll and .pdb files or should I be able to see them easily?
***
A related question regarding deployment is:
What files do I need to send over? Once the project is compiled/built on my local/dev machine, I do not need to send the aspx.cs files, right? I only need to send the .aspx and dlls, for the most part, right? Furthermore, this is better so that NO one can see my original code files, unless they did some sophisticated reverse engineering.
Is there an easy way to separate these files so that I can just copy over the files that I need? Right now, I don't see a way other than to go to production after coping the files, then deleting the .aspx.cs files individually ... there must be a better way, is there?
thanks ...
- nano
|
|

April 18th, 2012, 01:50 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
With a Web Site Project, code is compiled and assemblies are created on the fly on the very first request. So, you can simply upload your .aspx files and .cs / . vb code behind files to the server and they will be compiled into DLLs when you make a request. This works on a folder by folder basis so you don't need to upload the entire site; just the files that changed.
Cheers,
Imar
|
|

April 18th, 2012, 01:57 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
BTW:
Quote:
|
A related question regarding deployment is:
|
Are you talking about a Web Site Project or a Web Application Project? In the latter case, all you need are the ASPX files (and other resources), as all code is indeed compiled into assemblies. E.g. no need to deploy .cs files).
In the former case you do need to copy them to the server, unless you "precompile" the site. To do this, right-click the site in the Solution Explorer and choose Publish. Then optionally uncheck "Allow this precompiled site to be updateable" if you also want to compile the markup into the assemblies.
Notice that once you publish that, you can no longer simply FTP and changed Code Behind file.
Quote:
|
unless they did some sophisticated reverse engineering.
|
Code files cannot be requested from the server, so you're safe. If people have access to the server, they can also look at your DLL files and reverse engineer your code which is extremely simple: http://www.reflector.net/ and requires no sophisticated knowledge....
Imar
|
|

April 20th, 2012, 01:49 AM
|
|
Authorized User
|
|
Join Date: Sep 2011
Posts: 41
Thanks: 3
Thanked 4 Times in 3 Posts
|
|
Imar,
It was all kind of foggy ... I remember bit parts of what you said ... thanks for the clarification ...
- nano
|
|
 |
|