Hi When i try to activate my branding feature i am getting 403 error .I am deploying my css script files into layouts folder .
I am not able to understand where i was wrong it is working in all the test environments but not in production .
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
// Get the SPWeb we're being activated in.
var web = (SPWeb)properties.Feature.Parent;
if (null != web)
{
// Get the Site Collection root path to get the master page gallery.
string siteCollectionRoot = web.Site.RootWeb.Url;
// Set the Site Master to Custom.master
var siteMaster = new Uri(siteCollectionRoot +
"/_catalogs/masterpage/" +
"MYCUSTOM.Master");
web.CustomMasterUrl = siteMaster.AbsolutePath;
// Set the System Master to Custom.master
var systemMaster = new Uri(siteCollectionRoot +
"/_catalogs/masterpage/" +
"MYCUSTOM.Master");
web.MasterUrl = systemMaster.AbsolutePath;
// Clear the Alternate CSS
web.AlternateCssUrl = string.Empty;
// Save the changes back to the web
web.Update();
}
}