Friday, December 4, 2009

For Beginners: Add a custom ASP.NET page in your SharePoint Application

1. You have created your SharePoint site --> http://ServerName:PortNumber
2. You have created your .Aspx page in Visual Studio --> MyPage.aspx. (Remember to provide Complete details in 'Inherit' field of the 'Page' attribute present in the start of the .aspx page including Fully qualified page name, namespace, version, culture and public key token)
3. You have compiled the application and placed the error free dll in the GAC.
3. Go to 12 Hives --> C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES
4. Create a new folder named MyPageFeature and copy & add an existing feature structure there. Then add a new entry for your page i.e., MyPage.aspx in the Elements.xml file and delete all the other old links.
5. now open command prompt and navigate to --> C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
6. write the following command --> stsadm -o installfeature -name MyPageFeature -force
7. After the installation of your feature, you need to activate it by the following command --> stsadm -o activatefeature -name MyPageFeature -url http://ServerName:PortNumber
8. After operations completed succesfully, close the command prompt.
9. Reset IIS or the respective Application Pool.
10. Write the complete url (Eg: http://ServerName:PortNumber/MyPageFeature/MyPage.aspx) and hit enter to find your new page running in SharePoint environment.

No comments:

Post a Comment