Question

I've created an asp.net application and I publish it to a server. However, I'm curious to know what publishing it actually does.

Does this just create html files based on my asp code?

Is my backend code complied/built after publishing (anything else going on here?)

So basically, my underlying question:

why is it even necessary to publish?

I'm looking to optimize my website so I figured that understanding exactly what's going on here would be a place to start

Was it helpful?

Solution

From MSDN documentation

Visual Web Developer enables you to publish your Web sites, which compiles the site and copies the output to a location that you specify, such as a production server. Publishing accomplishes the following tasks:
•
Precompiles pages, source code in the App_Code folder, and so on, into executable output.

•
Writes the executable output to a target folder. 

It can't just create HTML files based on your code. Think about it, the output from the code affects the HTML, therefore it wouldn't make sense to just create static HTML pages.

OTHER TIPS

Google is your best friend.

From an MSDN article about publishing pages from VS:

...publish your Web sites, which compiles the site and copies the output to a location that you specify, such as a production server. Publishing accomplishes the following tasks:

- Precompiles pages, source code in the App_Code folder, and so on, into executable output. - Writes the executable output to a target folder.

See here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top