Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am new to Windows 2008 and IIS 7. With the default installation, IIS 7 has a Default Website. For my application, do I create a new Website outside of Default Website or create a Virtual Directory or Application within the Default Website?

Can someone explain the differences?

share|improve this question
add comment

2 Answers

For my application, do I create a new Website outside of Default Website

If you are only hosting one site, you can put it in Default Site. It is just what it says it is. A default website template. If you plan on hosting multiple sites, you should create different Web Sites for each in IIS so that they have different Application Pool and different Site Bindings.


or create a Virtual Directory or Application within the Default Website?

A directory is different from a virtual directory in the following way:

Directory
Actual file path : c:\inetpub\wwwroot\subdirectory
How is appears in the URL : http://yoursite.com/subdirectory

Virtual Directory
Actual file path : c:\anywhere\whatever\files\subdirectory
How is appears in the URL : http://yoursite.com/subdirectory

As you can see, a virtual directory is used to add a sub-directory to a site when that sub-directory is not located in the document root (in this case c:\inetpub\wwwroot).


or Application within the Default Website?

An Application is a little trickier to understand. The big-picture overview is this:

Additionally, in IIS 7 the concept of an application now has meaning to both IIS and the technologies that extend IIS functionality. An application is an object important to the server at runtime. This is because the IIS and ASP.NET request-processing pipelines have merged in IIS 7 so that content can take advantage of functionality previously provided for only managed code applications. For example, each managed code application runs in an Application Domain (AppDomain). An application can have several virtual directories, and each one will be served by the same AppDomain as the application to which they belong.

That snippet is taken from learn.iis.net and there is a much broader description there. I suggest you give that whole page a read. It talks about all of this in depth and contains many links to other useful resources.

share|improve this answer
add comment

If the a new site with a different URL and you manage the server, in most cases I recommend a few website. A website has unique site bindings on it.

A virtual directory is a sub-folder under an existing site and shares the same bindings.

So, if you have site1.com and site2.com, then make them their own websites. If you have site1.com and site1.com/subfolder, then they should share the same site.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.