Hello, Rathi. Thank you for your reply!
> Now as per ur steps you have installed the feature, now you need to activate it on your site.
> As per my previous reply once you are done with install feature, activate the feature from your code.
I did activate this feature from code but only to fail... the result was same as my post of previous....
I tried next two type.
Try 1 -> for Site Collection.
Feature.xml
------------------------------------------------------------------------------------------------------
<Feature Id="FDFCD4C4-F0D9-43b5-8739-A33681049657"
Title="Custom Master Pages"
Description="Custom master pages for use across multiple site collections."
Hidden="False"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">
</Feature>
------------------------------------------------------------------------------------------------------
ProvisionedFile.xml
------------------------------------------------------------------------------------------------------
<!-- _lcid="1033" _version="12.0.4407" _dal="1" -->
<!-- _LocalBinding -->
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="OSGMasterPages" Url="_catalogs/masterpage" Path="MasterPages" RootWebOnly="TRUE">
<File Url="Sample.master" Type="GhostableInLibrary">
<Property Name="ContentType" Value="My Sample Master Page" />
<Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/sample.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/sample.png" />
<Property Name="MasterPageDescription" Value="This is my sample master page for use with collaboration or publishing sites." />
</File>
</Module>
<Module Name="PublishingLayoutsPreviewImages" Url="_catalogs/masterpage" IncludeFolders="??-??" Path="" RootWebOnly="TRUE">
<File Url="Sample.png" Name="Preview Images/Sample.png" Type="GhostableInLibrary">
</File>
</Module>
</Elements>
------------------------------------------------------------------------------------------------------
program.cs
------------------------------------------------------------------------------------------------------
string strUrl = "http://sampledomain:999";
string strChildName = "Mysite";
SPSite ParentSite = new SPSite(strUrl);
ParentSite.Features.Add(new Guid("{FDFCD4C4-F0D9-43b5-8739-A33681049657}"));
SPWeb ParentWeb = ParentSite.OpenWeb();
SPWeb ChildWeb = ParentWeb.Webs.Add(strChildName, strChildName, strChildName, (uint)1033, "STS#1", false, false);
ChildWeb.MasterUrl = "/_catalogs/masterpage/Sample.master";
ChildWeb.Update();
------------------------------------------------------------------------------------------------------
Install is finished successfully, but when I accessed to http://sampledomain:999/Mysite,
an error occured 'Go back to site. Error. File Not Found.'
I checked http://hddms:999/_layouts/ManageFeatures.aspx?Scope=Site, the feature was
activated correctly.
Try 2 -> for Site.
Feature.xml
------------------------------------------------------------------------------------------------------
<Feature Id="FDFCD4C4-F0D9-43b5-8739-A33681049657"
Title="Custom Master Pages"
Description="Custom master pages for use across multiple site collections."
Hidden="False"
Scope="Web"
xmlns="http://schemas.microsoft.com/sharepoint/">
</Feature>
------------------------------------------------------------------------------------------------------
ProvisionedFile.xml
------------------------------------------------------------------------------------------------------
(same as up)
------------------------------------------------------------------------------------------------------
program.cs
------------------------------------------------------------------------------------------------------
string strUrl = "http://sampledomain:999";
string strChildName = "Mysite";
SPSite ParentSite = new SPSite(strUrl);
SPWeb ParentWeb = ParentSite.OpenWeb();
SPWeb ChildWeb = ParentWeb.Webs.Add(strChildName, strChildName, strChildName, (uint)1033, "STS#1", false, false);
ChildWeb.Features.Add(new Guid("{FDFCD4C4-F0D9-43b5-8739-A33681049657}"));
ChildWeb.MasterUrl = "/_catalogs/masterpage/Sample.master";
ChildWeb.Update();
------------------------------------------------------------------------------------------------------
Install is finished successfully, but when I accessed to http://sampledomain:999/Mysite,
an error occured 'Go back to site. Error. File Not Found.'
I checked http://hddms:999/License/_layouts/ManageFeatures.aspx, the feature was
activated correctly.
Umm... I read the article you told me again and again. but I don't know what happend...
something wrong with me???
>
Master Page Menu :You would see this link only when you havepublishing featureactivated for your site.
Ok. thank you for telling me that. All I have to do is letting the feature work correctly.
best regards.