Some interesting ASP.NET 2.0 FAQ

I found this post <I’m wondering – asp.net 2.0> on Mayvelous’s blog. I think those questions are very interesting. So, I was thinking to write the reply post for those questions but I didn’t have the exact answer for the generated xml file of .dll. I didn’t have time to find about that too. So, the post was saved as a draft in my blog for long time. I accidentally found this post in wp drafts collection yesterday. I made some changes today and post it here..

Why ASP.NET 2.0 website project does not create project file?

In ASP.NET 1.1, the configuration information of project used to store in *.csproj. If it’s a web project, the URL part is saved in *.webinfo. But it has been changed in ASP.NET 2.0. All of project configuration, path (both absolute part or virtual part) are stored in *.sln file only.

Why ASP.NET 2.0 webproject doesn’t create .dll file? Where all those code-behinds compiled into?

ASP.NET web pages and code files are dynamically compiled on request for the first time. The compiled resources are cached for next time request. So, no need to generate .dll for webproject. But It’s not good pratice and nobody won’t do that on their production server. Once I did it like that to know how bad that is. What I did was that I copied the whole folder of my website from my harddrive and uploaded it in FTP. Then, I tried to browse my website. It was very slow. I didn’t use any thrid-party components in that website. I think it will be more obviously slow if there are some third-party components used in website.

You should precompile your website if you wanna see *.dll file of your project. As you know, Precompilation is new features of .NET 2.0 which allows developers to precompile the entire website for boosting response time of your website.

Advantages of Precompilation (Ref: MSDN )

  • Faster response time for users, since pages and code files do not have to be compiled the first time they are requested. This is particularly useful on large sites that are updated frequently.
  • A means to identify compile-time bugs before users see a site.
  • The ability to create a compiled version of the site that can be deployed to a production server without source code.

More Info ~

>>I’m wondering, if we are to deploy it, do we only deploy .aspx and .ascx (front-end) files or have to include code-behind files as well?

not “have to” but you can if you want. Like I said above, you can include code-behind files in deployment. but it’s not good. Precompilation would be the best.

>>I’m wondering, why .pdb files are also included when you add project references to the website project.pdb files

AFAIK, this .pdb file is automatically generated if the Project configuration is set to “Debug” Mode. This file is used for storing the debugging information and symbols. Honestly, I dont have that much idea about this file. Please check .pdb file – MSDN for more info.

>>I’m wondering, do we need to add those .pdb and .xml along with referenced .dll in the deployment.

No. It’s not required. I’m sure that it’s not required to add those files in deployment but I dont know why xml files are generated. So, I have asked about it in CodeProject Forum. I got the answer as below from Scott Dorman in very short time. (Thank you! scott. )

The *.xml file is the compiler generated XML documentation file. The contents of this file come from the XML comments in the source code.

The *.pdb file is the debugging symbol file, also generated by the compiler. It contains the debugging “symbols” (information) needed by the debugger to be able to match the compiled binary to the source code when you are debugging.

>> I’m wondering, the main difference between asp.net 2.0 web application project and web site project.

AFAIK, asp.net 2.0 web application project is designed for those who wanna keep VS 2003 web project model. But I’m not very interest to use this since it doesn’t support in VS 2005 Express Edition. Here is the good article about Web Application Project and the differences between Web Application Project and Web Project.

Feel free to let me know if you have any comment for those answers. I’m just sharing in the way that I understand. If you have some more idea about those then feel free to discuss with me. Thanks.

9 thoughts on “Some interesting ASP.NET 2.0 FAQ

  1. Thanks for the information and all the reference links; they’re really useful and I’ll keep note of them. I’m still learning slowly on things and sometimes got confused or get mess up in head. I.T is a tough profession to follow as it’s rapidly changing and so hard to keep up with.
    Again many thanks for your post. :)

  2. Hi,

    I have gone through your postings, which are useful to all.
    Can you please share with me the main 10 differences between
    ASP.NET 1.1 and ASP.NET 2.0
    .NET 2.0 and .NET 3.0
    SQLServer 2000 and SQL Server 2005
    Oracle 9i and Oracle 10g

    Thanks,
    Ekamabram

  3. Okay. Ekambaram..

    Can you please share with me the main 10 differences between
    ASP.NET 1.1 and ASP.NET 2.0
    .NET 2.0 and .NET 3.0
    SQLServer 2000 and SQL Server 2005
    Oracle 9i and Oracle 10g

    I will post about this in my blog soon.. but i dont have any idea about Oracle …

Leave a Reply

Your email address will not be published. Required fields are marked *