Q1. How to I deploy a Visual Studio 2008 Web Application to SharePoint Server 2007? I notice that there is not much materials on such deployment except for one which mention Visual Studio 2005 (not Visual Studio 2008) deployment to WSS3 - http://msdn.microsoft.com/en-us/library/cc297200%28v=office.12%29.aspx. (Even though it mention also applies to MOSS 2007)

Q2. In the link itself, it mention about - "It is best to use a _layouts based application when the goal is to extend every site with some functionality such as additional administration pages." What does the _layout based application mean? (I could not find it as a project in Visual Studio 2008 SharePoint templates)

Do kindly note that the Visual Studio 2008 web application that I will be creating will be reading and writing data to and from a SQL database server and should be able to run inside SharePoint Server 2007

2 Answers 2


I usually use the following questions to see if I need to deploy an application page (_layouts).

  1. Does the page/application need to use the same masterpage as sharepoint for a completely integrated UI experience?
  2. Does the page/application need to use the SharePoint API?
  3. Does the data change depending on what SharePoint site you are currently accessing?

If you answered yes to any of the above, then an application page (_layouts) is what I would do. Otherwise, I would just deploy the webapplication to it's own virtual directory at the root or to another server.

The similist way to make an application page is to create an empty project that has the aspx files and code there. Make sure it's a web application project that generates a single dll and not a web site. Copy the aspx files into your own custom folder created in the 12 hive under /template/layouts. Copy the dlls into the _app_bin folder at the root of your site. Then you can access your aspx file at the url of your website then /_layouts/customfoldername/page.aspx or something similar depending on your file and folder names.

The better way is to do the same thing I mentioned above is to package it in a wsp to do the copying for you.

  • Thanks Steve, I will try out your suggestion first. By the way, what is the deployment for both asp.net web application & asp.net web site different? Commented Sep 22, 2011 at 0:59
  • This might help: compiledthoughts.com/2008/05/… Commented Sep 22, 2011 at 1:18
  • Thanks Steve for the link. Seem like Web application is preferable. By the way, what keyword you enter into the web browser to get that link? Commented Sep 22, 2011 at 1:31
  • Just one more question - can I assume that the steps taken for Visual Studio 2005 can be "re-use" for Visual Studio 2008? Commented Sep 22, 2011 at 1:38
  • I did a google search of "web application vs web site" to get that link. Yea, in that article the steps should be similar for 2008. Commented Sep 22, 2011 at 1:59

Here are some scripts to allow deployment to multiple site collections in a web application.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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