Add Custom ASPX Pages or ASP .Net Pages in SharePoint

The Problem: Let’s say we have an ASP .Net Web Application with many web forms, user controls, business layer, and data access layer. It works fine as a web application. What we are looking for integrating the files within this web application into the SharePoint site and totally get rid of the web application. This has couple of advantages:

  1. Business users and end users need not go to a separate web application (URL). Users can see all those pages within SharePoint site.
  2. Once the integration is done, we have the SharePoint site’s security and access rules i.e. Authentication and Authorization is in place without any additional work.
  3. Simple development experience as compared to developing with web parts.

In a nutshell this option allows us to build an ASP.Net application outside of SharePoint, build it, test it & then add it to SharePoint. Now, the problem is what are the ways to deploy the ASP .Net application pages into SharePoint and which one is should we go with. After doing some research and work I found that there are many ways in which we can do this. Below is a brief discussion of the sam.

Solutions:

  1. The SharePoint designer approach: This approach can be used if there are few aspx pages with little functionality.
  2. Using web parts. This can be used in conjunction with SharePoint designer. But once again, developing many web parts is not feasible and also raises performance issues.
  3. _Layouts folder approach: This is the simplest of all. Just deploy the web application pages under the _layouts folder of SharePoint and the pages can be accessed from any SharePoint site. Cons: The pages don’t inherit the security and access rules from SharePoint. The pages can be accessed from any site existing on that server farm. Master Page integration is not possible. MSDN Article explains with a sample.
  4. User controls using Smart Part: In this approach, the developer can develop web parts using the third party Smart Part control. In this way the developer can have the drag – drop functionality as he/she can develop it as a user control and drop it in the smart part. This method is similar to web parts but the developer has the privilege of drag-drop functionality but it still carries the negatives mentioned for the web parts approach.
  5. Using features and WSP package: Following some steps as recommended by Andrew Connell (MOSS MVP). Here is the blog. I believe this is the standard approach users are using in the SharePoint developer community.
  6. Using VSeWSS (Visual Studio extensions for WSS): This is yet another and latest solution. Microsoft recently released the VSeWSS 1.1 RTM. Using this, we can deploy all the asp .net pages into SharePoint by setting up a new project in Visual Studio. VSeWSS creates a solution package using features. Setup the project and hit ‘Deploy’ and it is done.

Below are the blog links I referred to:

http://blogs.msdn.com/cjohnson/archive/2006/09/05/application-development-on-moss-2007-amp-wss-v3.aspx

http://blogs.msdn.com/cjohnson/archive/2007/12/15/building-a-simple-asp-net-page-based-sharepoint-application-in-visual-studio-with-the-visual-studio-extensions-for-wss-ctp-1-1.aspx

http://www.andrewconnell.com/blog/articles/UsingCodeBehindFilesInSharePointSites.aspx

http://www.andrewconnell.com/blog/articles/UsingVisualStudioAndMsBuildToCreateWssSolutions.aspx

More Links: Some are related to SharePoint 2003.

http://www.sharepointblogs.com/jessefitz/archive/2008/01/24/integrating-an-asp-net-application-into-our-sharepoint-portal.aspx

http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=242

http://aspalliance.com/936_Including_Your_Own_ASPNET_Pages_in_Your_SharePoint_Portal.all

Yet another nice contribution by Andrew Connell :

http://www.wrox.com/WileyCDA/Section/id-305859.html

7 Responses

  1. [...] Add Custom ASPX Pages or ASP .Net Pages in SharePoint [...]

  2. [...] conocer desde SPContext.Current) Te dejo una url de las muchas que puedes encontrar en la red: http://sharenotes.wordpress.com/2008…in-sharepoint/ Saludos, David Martos http://david-martos.blogspot.com "wibelw" <wibelw> wrote [...]

  3. i want deploy a page that uses txt file whivh lies at same level where aspx page is lying..
    which is the feasible way to do it..?

  4. Hey,

    Can I create new content type which will point/open my custom ASPX page, in which I have written all business logic, validation and etc.?

    e.g. I would like to see my custom ASPX page when I click on “NEW” into my list, in future also, I need to attach workflow to my ASPX page, can you please let me know what’s the BEST way to fulfill this requirement ?

    Thanks,
    Sanket

  5. Thanks for the summary !

  6. Лучшее остекление балконов. Предлагаем услугу по остеклению ваших лоджий. Профиль только REHAU и PROVEDAL. Нестандартные виды работ. Вынос остекления, монтаж крыш, укрепление ремонт балконов, кладка пеноблоком, утепление, евроотделка отделка внешняя и внутренняя, монтаж шкафчиков тумбочкек на балконе лоджии, электрика, сушки для белья, и многое другое. Предлагаем Вам полный комплекс работ по внутренней отделке балконов и лоджий. Остекление балконов и лоджий. Сайт elit-balkon ru

Leave a Reply