Tag Info

New answers tagged

0

perhaps you have the url wrong this Url="_catalogs\masterpage" should be Url="_catalogs/masterpage"


0

Maybe you are trying to activate an event receiver feature in a site that doesn't have the list created -and needed- where the event receiver is attached.


0

After struggling for hours trying all the above solutions, Restarting the machine resolved this issue for me.


1

But you have this option also: SPLongOperation.Begin( delegate(SPLongOperation longOperation) { // Do something that takes a long time to complete. ContentTypeMapping CTMapping = new ContentTypeMapping(site); CTMapping.MapContentTypesToWorkspace(null, web); // Inform the server that the work is done // and ...


0

Verify your content type "A" have the parameter "Inherits=TRUE", if not the child cannot find it.


1

Use the following code to retrieve the file contents as string in your feature activation code: SPWeb web=(SPWeb)properties.Feature.Parent; string fileUrl="/_catalogs/masterpage/PageFromDocLayout.aspx"; string pageFromDocLayoutContent=web.GetFileAsString(fileUrl); Then do some modification to the file contents as you wish. According to your ...


0

try the below code. public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPWebApplication webApp = (properties.Feature.Parent as SPSite).WebApplication; SPWebConfigModification modification = new SPWebConfigModification(); modification.Path = "configuration/system.web/customErrors" modification.Name = "mode" ...



Top 50 recent answers are included