Journey to MCTS 70-515: Lesson 2 – Creating Websites
January 26, 2011 2 Comments
Creating or Deploying Websites
IIS 7.5 does not support Front Page Server Extensions because it uses WebDAV natively. Therefore HTTP deployment cannot be used to create the website. But you could create a file-system based or FTP website. Of those two, the file-system–based website is preferred.
If you are creating or deploying the website on a remote server then the remote server must have .NET Framework 4, ASP.NET, and Front Page Server Extensions installed and enabled. Note that Microsoft does not support Front Page Server Extensions on IIS 7.5 and Windows Server 2008 R2. So a new website cannot be created using the HTTP deployment in Visual Studio. If you receive the error message below then create the website by using the file system or FTP.
Exception:
Unable to create the website ‘http://servername’. The web server does not appear to have FrontPage Server Extensions installed
Use FTP deployment only when using a web hosting provider that does not support file-system based websites, WebDAV, or Front Page Server Extensions. This is because by default FTP sends user credentials unencrypted. For security reasons change your password regularly when using FTP deployment to minimize the potential impact of compromised credentials.
What are ASP.NET Folders?
These are special folders which are protected by ASP.NET. If users attempt to browse any of these folders (except App_Themes), they will receive an HTTP 403 Forbidden error.
App_Browsers, App_Code, App_GlobalResources, App_LocalResources, App_Themes, App_WebReferences, and Bin are the ASP.NET special folders.
Can C# web page and VB web page code exist in the same website?
A web page can only have either Visual Basic or C# code. But you can have both web pages with Visual Basic and C# in the same ASP.NET 4 website project. Only not within a web application project.
Website Compilation
There are two models for compilation, a) dynamic compilation and b) precompilation.
Dynamic Compilation:
ASP.NET automatically compiles the application into an assembly and loads it into the website application domain. This takes a few seconds thus affecting performance for any requests received before ASP.NET has finished compiling the application.
Precompilation:
The other option is to precompile the website within Visual Studio IDE. The entire website is compiled and checked for build errors. This model allows only the layout code and associated assemblies to be deployed on the web server.

