How to Debug Feature Receiver Assemblies in Visual Studio – MOSS 2007

If you try to activate the feature using stsadm command you will not be able to debug the feature receiver assemblies.

Open the Site collection features in

Site Actions ->

Site Settings ->

Modify All Site Settings ->

Site Collection Administration -> Site Collection features

Attach the w3wp.exe process in visual studio. Place breakpoints. […]

Kako Force MOSS 2007 Timer Jobs se Execute

Uporabite naslednji ukaz stadm na silo timer delovnih mest, delovna mesta za izvršitev. ni treba čakati na interval za izvedbo timerjobs. stsadm.exe-o execadmsvcjobs

Programsko Dodaj uporabnika na SharePoint Group

To assign the user to group in MOSS 2007

The following code will add the user to site and to specified group.

private void AddUser(string strSite,string webGroup) { SPSecurity.RunWithElevatedPrivileges(delegate() { uporabo (SPSite site = new SPSite(strSite)) { uporabo (SPWeb web = site.OpenWeb()) { Boolean allowUnsafeUpdate = web.AllowUnsafeUpdates; try { web.AllowUnsafeUpdates = true;

web.SiteUsers.Add(loginName, MailId, […]

Best Practices: Using Disposable Windows SharePoint Services Objects

When am started program using sharepoint objects. I found little bit difficult to understand about the sharepoint objects lifetime and best approach to dispose it. I found the following MSDN article which helps me a lot to learn and understand about sharepoint objects disposal.

Refer it here