Migrating Asp.net web 3.5 application to sharepoint 2010

In this example we migrate a asp.net web application,in which we fetch data using sqlDataSource and bind it to gridview.


Steps in Visual studio 2010

Note:.net framework should be 3.5

1)Create a web application “bindData” ,design the web from  say “bindSqlDataSource” with gridview and sqldatasource.

2)Configure sqldatasource and bind the dataSource to gridview.

3)Give the stong name

   i)Project properties=>Signing=>enable the checkbox”Sign the assembly”=>New=>enter the Key File Name=>Disable the checkbox “Protect the key fine name”

4)Copy the assembly and namespace from the Application tab in the project properties.

5)Add security tag to  the Assembly.cs file under properties .


6)Build the application

7)Copy the connection string from web.config file of web application since,the connection for sqlDataSource wold be in web.config file.

 Steps in sharepoint filesystem 

1)Go to inetpub,wwroot,wss,virtualdirectories,portno,bin

 copy the dll from the bin location of the web application to site bin location.

Web app bin

site bin

2)open the web.config file

  i)Add this tag   under  PageParserPaths=><PageParserPathVirtualPath=/*CompilationMode=AlwaysAllowServerSideScript=trueIncludeSubFolders=true/>

 ii)Add Safecontrol tag:

   <SafeControlAssembly=bindData, Version=, Culture=neutral,  PublicKeyToken=0ea2c35f98b475b8Namespace=bindDataTypeName=*Safe=TrueAllowRemoteDesigner=True/>

   You can get the public key toke using reflector tool

iii)Add the connection to site web config file from web application’s web.config file


Steps in sharepoint designer

1)Open the site in sp designer 2010

2)After opening the site import file  ,  “bindSqlDataSource” form

3)Open the file in advanced mode and remove the code tag from the page directive

4)Preview in browser,

Attaching the masteroage to aspx pages is followed in the next post


About alekhyakodamsharepoint

Hi.. I am alekhya working as a sharepoint developer.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s