Home » SharepointRSS

Authentication in ASP page deployed in Sharepoint 2007

Hi,

Currently I am creating a silverlight application and hosting it in SharePoint 2007 using this (http://www.andrewconnell.com/blog/articles/UsingCodeBehindFilesInSharePointSites.aspx) method. Everything is working fine. But when I deactivate this feature and again when I typed the address ,the page is displayed. My requirement is like when I deactivate this feature, I should not be able to see the page even if I type the address. Could you please tell me how to achieve this?

 

Regards,

Raaj

 

2 Answers Found

 

Answer 1

When you deactivate a feature, items and documents are not removed automatically.  You will need to add a feature receiver to your project and add code to delete the file when the feature is deactivated.  To create a feature receiver, follow the steps in this blog post:   http://blog.tylerholmes.com/2008/03/walkthrough-creating-sharepoint-feature.html

Afterwards, add code to the OnFeatureDeactivated method to remove the file.  You can use the GetFile method of the SPWeb class to get an instance of the SPFile class representing the page  you want to delete.  Finally, call the Delete method on the SPFile class.

--
Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Microsoft MVP - sharepoint  Services
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net

 

Answer 2

Thanks a lot Bryan!

It works.

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Tech Videos   |   Follow us on Twitter