Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3355628
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:25:05+00:00 2026-05-18T02:25:05+00:00

I come from a PHP/Rails background where deploying a website often means FTP/Checkout of

  • 0

I come from a PHP/Rails background where deploying a website often means FTP/Checkout of the source code in the correct directory on the web server.

However, I’ve been asked to develop an ASP.NET website and some people have advised me to “Publish” the site instead of copying over the source code directly. Apparently, this converts the codebehind (.cs) files into compiled DLL’s etc.

My application does not contain any specific secretive business logic. It’s a common shopping cart app. My question is if this is a good idea? How does not making the C# code reside on the server make the app more secure?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:25:05+00:00Added an answer on May 18, 2026 at 2:25 am

    ASP.NET code will always be compiled – either:

    1. At run-time – you can copy .ASPX and
      .CS files to the server. When a page
      is requested the .ASPX and .CS files
      will be compiled on-the-fly. The
      ASP.NET run-time will create a DLL
      containing the compiled code (this
      lives in a folder called Temporary
      ASP.NET files and the location
      depends on the version of .NET
      you’re using).
    2. Pre-compiled – you can choose to compile your code before deploying it to your server. This is what the Publish command does in Visual Studio. It compiles your .ASPX and .CS files into (one or more) DLLs that are then uploaded to the web server.

    Personally, I don’t think there’s much of a security benefit from deploying pre-compiled code (unless you’re obfuscating your pre-compiled DLLs).

    That said I prefer it for these benefits:

    • It seems tidier, at least to me, than having a bunch of .CS files littered in a folder
    • There’s a small performance benefit of not having to do C# compilation. Note your code will still need to be JITed from IL to native code and this still incurs the initial request performance hit (unless you use new ASP.NET 4.0 and IIS 7.5 features or something else).
    • The Publish feature lets you package your application up for deployment to other environments (testing, pre-production, production, etc.)

    Note: coming from Rails/PHP you might like to keep on deploying both .ASPX and .CS files to your server. The benefit is that it’s easier to modify a running application in a way you may be used to doing. This isn’t a great practice if you’re following a rigorous deployment lifecycle but it can be useful in some cases.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I come from PHP background and am used to doing var_dump , echo and
I come from a php background and in php, there is an array_size() function
I come from a PHP background and I'm just getting my teeth into some
I'm not too used to ORM mapping, having come from a PHP background. I'm
I'm new to PHP but come from a Java background and I'm trying to
I come from a PHP background and would like to know if there's a
I primarily come from a PHP background but I have been asked to develop
I come from a PHP background and I'm used to calling a class' internal
I come from a PHP and Python/GAE background and am new to RoR. Typically
i am new to webforms and come from a php background. when creating complex

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.