For Answers, see/post comments

ASP .NET 2.0 Visual Studio 2005 - Deploying - No DLLs

I usually deploy my ASP .NET application to the server by publishing, using Visual Studio 2005 publish feature. This creates the Bin folder on the server, with the compiled DLLs.
I've been asked to publish by copying the files manually instead. I stopped IIS for the application, deleted the application files and subfolders from the server, copied the files and folders from my local PC's project, restarted IIS, and launched the application in my browser.

The application ran normally, and I expected that first use would have triggered a compilation of the website, but there are no DLL files in the Bin folder, like when I publish with Visual Studio.
How does this work? How can I still use copy to deploy, and get a compiled website?

9 comments:

Babu A said...

ASP.NET 2.0 compiles your application on a fly. So it's important to copy not only your aspx pages but .cs (or .vb) files as well from directory APP_CODE..

the BIN will have only dependency DLLs in it...


If you want to have a DLL and do not want to copy source code look up
"precompiling asp.net application"

Anonymous said...

All source code (code behind, and source siles in the App_Code folder) is on the server.

I thought that the application would be compiled on the server the first time it was ran, and this would create the DLL files in the BIN folder.

Isn't that the way it works?

Anonymous said...

For some reason, the DLLs for thie website are not in the .NET temporary
files folder, although I can see other project's folders with the DLLs inside.

Why is that this project didn't compile?

Anonymous said...

Are you having a problem or it's just a theoretical question..
Why do you worry so much where DLLs are.. Who cares....May be it was
compiled and all DLLs only exist in memory only (I know that .NET does not
do that, but why not... )

Let try more reasonable approach:
a). If your application works then look harder in .NET temp folders....
b). If your application does not work then you should be getting an error
message. Let us know exact error you getting....

Anonymous said...

Why is that this project didn't compile?

If your development server is running IIS, you can precompile the app in place with:
Aspnet_compiler -v /WebAppVirtualName


Then, manually copy the application's files to your server.

Anonymous said...

Thanks, I'll try that. The problem is that developers have no access to Test
and Production environments, so we depend on the infrastructure people to
deploy,but it's not their responsibility to compile or use any development
tool, but at the same time, the policy best practices do not allow source
code to be on the server.

All these constraints make me waste so much time! If they just let me
publish from my Visual Studio to the server, that'd take 5 minutes, but you
know how it is :-P

Anonymous said...

not for the sake of knowledge. I replied to Juan explaining why I
need to know that.
Thank you for your advice. The folder and the DLLs were under the ASP .NET
temp folder, but the folder had an old timestamp, and didn't have the
application's name like most of the others, so it took me some time to open
each folder and the subfolders,and then figure out what application the DLLs
belonged to.

Thanks anyways

Anonymous said...

I understood why you want that.
But I would advice against of grabbing your "temp" dlls and move them to
production...
Who knows what is going on behind the scene....

Just precompile your app on your development server. It will create bunch of
DLLs in BIN folder.
http://articles.techrepublic.com.com/5100-3513-6116804.html


I think I advised you to do so in the beginning but you kept looking from
DLLs thus confused me since I did not understand exactly what you want.


PS: if you need to change something in your project you will need to remove
all DLLs from production and copy new precompiled one... since the names of
dlls pretty much random...

Anonymous said...

You can publish your site to a directory on your computer and then copy
up what you want.