Moving ASP.NET to SharePoint

In these days SharePoint become more and more popular. There are number of web project which starts directly in SharePoint, but however a lot of project remains out the SharePoint scope, and exists as pure ASP.NET application.

The one of the common task of migrating ASP.NET application to SharePoint is changing the site landing page to become SharePoint page. But it’s where the problem starts. ASP.NET applications tend to consume different modern tools and technologies like ASP.NET MVC, SilverLight, URL Rewriting and others which seems to be very common in pure ASP.NET development, but could be the potential problems in SharePoint world.

There are three thing you need to concentrate on


  • Remove AutoEventWireup="true" attribute. SharePoint doesn’t support it on all pages;
  • User controls are not supported on, so move them to CONTROLTEMPLATES folder and change references
  • Check that all classes you inherit from has the namespaces

2) CSS

  • SharePoint doesn’t support CSS validation on 100%, so I can hardly recommend something specific here. But what did helped me a lot id debuging and CSS customization is just to have the “clean” CSS file, which resets all customization

3) Web.config

  • You need to make sure that you are using the right siteMap defaultProvider (<siteMap section>) from your ASP.NET web.config, otherwise all your SiteMap elements will be considered as Sharepoint Publishing classes elements (if u have MOSS), which are differs from SiteMap classes
  • If you are using URL rewriting or other specific modules you need to create the <system.webServer> section in SharePoint config file and add them there.
  • You need to add all your DLLS to the list of SafeControls

4) Code

  • You need to have [assembly: AllowPartiallyTrustedCallers()] in your dlls.
  • DLLs must be signed
  • All classes must have namespaces


Mirror: Moving ASP.NET to SharePoint


  1. Dhawal Mehta Said,

    March 5, 2009@ 9:17 am      Reply

    Hi Michael,

    I appreciate your valuable tips. Since long I am searching for something similar.

    Is it possible for you to give some more tips on the points to take care while migrating ASP.NET custome application to SharePoint?

    Dhawal Mehta

  2. laflour Said,

    March 5, 2009@ 11:16 am      Reply

    I put comment to my tips which I”m planning to publish and will find good topics for this area

  3. traslochi milano Said,

    November 27, 2009@ 6:01 am      Reply

    This is really nice and interesting article.I m glad to know.

RSS feed for comments on this post · TrackBack URI

Leave a Comment