June 2008 - Posts
Here is code which works for me, public interface IRemoteMethods : IDisposable { void createUserProfile(); } public class RemoteMethods : MarshalByRefObject, IRemoteMethods { public void createUserProfile() { //Code to create User Profile } public void
Read More...
" RunWithElevated() does an ImpersonateSelf(), so the thread is impersonating the process identity . Also, all SPSite objects created within the RunWithElevated() scope are treated as SHAREPOINT\system, have full control over the site. But it does not
Read More...
You can also map a drive directly to your GAC and then you'll be able to see the actual directory structure. Go into command prompt and type: subst z: %windir%\assembly\gac I got this info from http://weblogs.asp.net/jkey/archive/2003/02/25/3006.aspx
Read More...
SPSite site = new SPSite(" http://[ServerName/sitename ]"); SPWeb web = site.OpenWeb(); SPList list = web.Lists["ListName"]; SPFolder f = web.GetFolder(" http://[ServerName/sitename]/Lists/ ListName /FolderName " ); if(f.Exists) { SPListItemCollection
Read More...
using Microsoft.SharePoint; using System.Collections.Specialized; public void OnActivated(SPFeatureReceiverProperties properties) { SPWeb web = (SPWeb)properties.Feature.Parent; string url = new Uri(web.Url).AbsolutePath; SPDocumentLibrary docLib = (SPDocumentLibrary)web.GetListFromUrl(
Read More...