Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts
Monday, May 26, 2014
Tuesday, March 4, 2014
Sharepoint 2010 FBA - Step by step
Very often we need Forms based authentication which require a set of sequence steps
http://csharpdotnetfreak.blogspot.com/2012/08/sharepoint2010-forms-based-authentication-fba-claims.html
Also try this
https://www.nothingbutsharepoint.com/sites/itpro/pages/how-to-configure-form-based-authentication-in-sp2010.aspx
http://csharpdotnetfreak.blogspot.com/2012/08/sharepoint2010-forms-based-authentication-fba-claims.html
Also try this
https://www.nothingbutsharepoint.com/sites/itpro/pages/how-to-configure-form-based-authentication-in-sp2010.aspx
Monday, July 29, 2013
Wednesday, July 17, 2013
Unable to find a Configuration whose ID
Error
Error occurred in deployment step 'Add Solution': Unable to find a Configuration whose ID is equal to 1 in the WebTemplatePackage_Feature1\Bala Template\onet.xml file for feature {7e557079-c818-415d-850b-c6445896ff96}. The WebTemplatePackage_Feature1\Bala Template\onet.xml file must contain a Configuration element whose ID attribute is equal to the BaseConfigurationID attribute declared in the WebTemplate element.
Cause
The IDs in Element.xml and Onet.xml didn't match.
Solution
The IDs in Element.xml (baseconfigurationID) and Onet.xml(ID) should be the same. Refer the below sample code.
Error occurred in deployment step 'Add Solution': Unable to find a Configuration whose ID is equal to 1 in the WebTemplatePackage_Feature1\Bala Template\onet.xml file for feature {7e557079-c818-415d-850b-c6445896ff96}. The WebTemplatePackage_Feature1\Bala Template\onet.xml file must contain a Configuration element whose ID attribute is equal to the BaseConfigurationID attribute declared in the WebTemplate element.
Cause
The IDs in Element.xml and Onet.xml didn't match.
Solution
The IDs in Element.xml (baseconfigurationID) and Onet.xml(ID) should be the same. Refer the below sample code.
Tuesday, July 9, 2013
STSADM Environment Variable SharePoint 2007 and 2010
Instead of navigating to the bin directory in the 12 hive, you can access stsadm.exe from any directory by adding an environment variable:
Note: for 2010, add this instead:
;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN
Source : http://sharepointcherie.blogspot.in/2009/09/stsadm-environment-variable-sharepoint.html
- Start -> All Programs -> Control Panel -> System
- On the Advanced tab, click the Environment Variables button.
- Select the variable Path and click the Edit button.
- Add the following to the end of the Variable value field:
;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN - Click OK.
Note: for 2010, add this instead:
;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN
Source : http://sharepointcherie.blogspot.in/2009/09/stsadm-environment-variable-sharepoint.html
Friday, July 5, 2013
Monday, July 1, 2013
Wednesday, June 26, 2013
SharePoint 2010 farm topologies
- http://programming4.us/enterprise/3492.aspx
, discussion of three supported topologies: Single Data Center High-Availability Model, Cross-Site High-Availability Model, and Multiple-Farm Cross-Site Model.
- http://technet.microsoft.com/en-us/library/cc263199.aspx
, technical diagrams of recommended solutions.
- http://www.microsoft.com/en-us/download/details.aspx?id=6096
, common ways to build and scale farm topologies.
- http://www.techbubbles.com/sharepoint-2010/sharepoint-2010-farm-topologies/
, nice explanation of basic terminology.
- http://sharepointsolutions.com/sharepoint-help/blog/2011/02/how-to-scale-out-a-sharepoint-2010-farm-from-two-tier-to-three-tier-by-adding-a-dedicated-application-server/
, scale out from a 2-tier farm to a 3-tier farm.
- http://www.sharepointedutech.com/2011/01/02/topology-med-sp2010-farm/
, topology and licensing example of medium farm.
- http://www.astaticstate.com/2010/07/sharepoint-2010-physical-topology.html
, examples of diagramming SharePoint topologies.
- http://technet.microsoft.com/en-us/library/ee805948.aspx
, 3-tier farm.
- http://mscerts.programming4.us/sharepoint/Topologies%20for%20SharePoint%202010.aspx
, discussion of basic types of deployment.
Testing and Verifying SP2010 after software Installation and configuration
Even though you are ready to head out the door and head home since you are probably doing this on a night or weekend, it is really important to fight the urge to leave too soon. You really need to do some basic testing and verification before you leave. It will be a lot better to find out about any problems now rather than when the next business day has already started.
Here is what I recommend doing before you leave:
- Browse to each of your SharePoint web applications and log in with your user account and make sure you can hit the home page of each of them.
- While you are there, try to open up and edit a document in the browser using one of the Office 2010 Web Apps (Word, PowerPoint, Excel or OneNote).
- Browse to your My Site and verify that everything is working normally.
- Add a unique phrase to a test page somewhere in one of your Sites (I always use the phrase “jabborwocky”
) and then go run an incremental Search crawl from Central Administration. After the crawl completes, go back to your Site Collection and search for the phrase. Verify that it comes up in the results.
- Run an incremental User Profile Synchronization from the User Profile Administration page. While it is running, logon to the desktop of the new Application Server, and find this program and run it: c:\program files\microsoft office servers\14.0\synchronization service\uishell\miisclient.exe. This is the Forefront Identity Management (FIM) client application that you can use to see the details of the AD synchronization process. Several jobs will be run by FIM. Verify that they all complete successfully with no error messages.
- In Central Administration, go into Manage Service Applications and click on Managed Metadata Service and select Manage in the ribbon. Verify that the Term Store management interface loads and that you can add/change/delete a Term Set and some Terms.
- Finally, reboot your WFE and Application Server. When they come back up, check your Windows System and Application event logs on those servers and verify that there are no SharePoint-related critical or warning events that you haven’t seen before you scaled out to three tiers.
- Browse to your primary web application one more time before you head out the door.
Tuesday, June 25, 2013
Scale out Sharepoint 2010 Farm
How to Scale Out a SharePoint 2010 Farm From Two-Tier to Three-Tier By Adding A Dedicated Application Server
http://sharepointsolutions.com/sharepoint-help/blog/2011/02/how-to-scale-out-a-sharepoint-2010-farm-from-two-tier-to-three-tier-by-adding-a-dedicated-application-server/
http://www.khamis.net/blog/Lists/Posts/Post.aspx?List=6c8a23d1%2D47ea%2D47e5%2Db56f%2D2bc57cb95b93&ID=48&Web=d64cd8b3%2Da3f4%2D40d8%2D8d93%2D6aa6dc82fcda
Tuesday, June 4, 2013
Apply Theme for Publishing site
public override void FeatureActivated(SPFeatureReceiverProperties properties) { ApplyTheme(properties); } /// <summary> /// Sets master page and css properties for the site collection /// </summary> /// <param name="properties"></param> private void ApplyTheme(SPFeatureReceiverProperties properties) { SPSite site = (SPSite)properties.Feature.Parent; if (site != null) { // System Master Page Uri masterUri = new Uri(site.RootWeb.Url + "/_catalogs/masterpage/v4.master"); site.RootWeb.MasterUrl = masterUri.AbsolutePath; // Publishing Master Page Uri customMasterUri = new Uri(site.RootWeb.Url + "/_catalogs/masterpage/mycustom.master"); site.RootWeb.CustomMasterUrl = customMasterUri.AbsolutePath; //logo and css site.RootWeb.SiteLogoUrl = "/_layouts/MyProjectName/Images/mycustomlogo.jpg"; site.RootWeb.AlternateCssUrl = "/Style Library/MyProjectName/css/mycustomcss.css"; site.RootWeb.Update(); } }Monday, June 3, 2013
Wednesday, May 29, 2013
SPWebApplication.Lookup Method
Finds the Web application that is located in the specified path.
static void Main(string[] args) { SPWebApplication app = SPWebApplication.Lookup(new Uri("http://spdev2010:1000")); }
Saturday, May 25, 2013
SharePoint 2010 - SPMetal and Multi list view using Visual webpart
SPMetal.exe resides in "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN" folder.
Example
SPMetal.exe /web:http://YOURSITE /code:SiteEntities.cs
Friday, May 24, 2013
Sharepoint 2010 Content Type Hub - Publish and subscribe
SharePoint 2010 now introduces a new feature called Content Type Hubs.Content Type Hub is a central location where you can manage and publish your content types – so now web applications can subscribe to this hub and pull down the published content types from the hub. Even receive updates on the published content types!
Some of the useful links are
http://www.sharepoint4developers.net/en-nz/post/sharepoint-2010-content-type-hub.aspx
http://chakkaradeep.com/index.php/sharepoint-2010-content-type-hubs-publish-and-subscribe-to-content-types/
http://blogs.msdn.com/b/chaks/archive/2011/09/04/web-templates-and-content-type-publishing.aspx
Some of the useful links are
http://www.sharepoint4developers.net/en-nz/post/sharepoint-2010-content-type-hub.aspx
http://chakkaradeep.com/index.php/sharepoint-2010-content-type-hubs-publish-and-subscribe-to-content-types/
http://blogs.msdn.com/b/chaks/archive/2011/09/04/web-templates-and-content-type-publishing.aspx
Wednesday, March 20, 2013
Master Page : MasterPageFile property & 4 Tokens
In SharePoint, this
http://www.codeproject.com/Articles/43377/SharePoint-Dynamically-Change-Master-Page
public class DynamicMasterPageModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute);
}
void context_PreRequestHandlerExecute(object sender, EventArgs e)
{
Page page = HttpContext.Current.CurrentHandler as Page;
if (page != null)
{
page.PreInit += new EventHandler(page_PreInit);
}
}
void page_PreInit(object sender, EventArgs e)
{
if (CurrentUser.UserType == UserType.Admin)
{
MasterPageFile = "~/MasterPages/AdminMaster.master";
}
else if (CurrentUser.UserType == UserType.NormalAuthenitcated)
{
MasterPageFile = "~/MasterPages/NormalAuthenticatedMaster.master";
}
else
{
MasterPageFile = "~/MasterPages/AnonymouskMaster.master";
}
}
}
MasterPageFile property is used differently. It may be or may be not the location of the master page file in SharePoint. In SharePoint MasterPageFile can take four predefined values (called tokens). Based on the token values, SharePoint determines which master page to use for the page (default, custom, site collection, etc). The four tokens fall into two categories: dynamic and static. Static token is used by itself to define the master page location. The two static tokens are described below: - Token "~site/MasterPageName.master"
In this token, the~siterefers to site relative URL andMasterPageName.masteris the name of the master page. So if you provide the token “~site/masterpages/MyMaster.master” and your site URL is like http://sitecollection/site1 then the master page URL will be http://sitecollection/site1/masterpages/MyMaster.master.
- Token "~sitecollection/MasterPageName.master"
Here the token ~sitecollection points to the site collection URL. So if your site collection URL is http://sitecolleciton then the master page location will be http://sitecolection/MasterPageName.master.Dynamic token doesn’t provide the master page location rather it points where to get the master page file location. Dynamic tokens are exact values and you can’t change them like static token. The two dynamic token are described below:
- Token "~masterurl/default.master"
When you’ll set the value likePage.MasterPageFile= "~masterurl/default.master", SharePoint will use the master page provided inSPWeb.MasterUrlproperty. So if you set master page file to this token, you need to ensure that you have provided the master page location toSPWeb.MasterUrlproperty. FYI, the dynamic token is not changeable and you need to provide exact “~masterurl/default.master”.
- Token "~masterurl/custom.master"
When you will use this token, then SharePoint will useSouce:Article to change the master page dynamically using HTTPmodulesSPWeb.CustomMasterPageUrlproperty. So along with setting this token, you also need to set theSPWeb.CustomMasterPageUrlproperty. FYI, the dynamic token is not changeable and you need to provide exact “~masterurl/default.master”.
http://www.codeproject.com/Articles/43377/SharePoint-Dynamically-Change-Master-Page
public class DynamicMasterPageModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute);
}
void context_PreRequestHandlerExecute(object sender, EventArgs e)
{
Page page = HttpContext.Current.CurrentHandler as Page;
if (page != null)
{
page.PreInit += new EventHandler(page_PreInit);
}
}
void page_PreInit(object sender, EventArgs e)
{
if (CurrentUser.UserType == UserType.Admin)
{
MasterPageFile = "~/MasterPages/AdminMaster.master";
}
else if (CurrentUser.UserType == UserType.NormalAuthenitcated)
{
MasterPageFile = "~/MasterPages/NormalAuthenticatedMaster.master";
}
else
{
MasterPageFile = "~/MasterPages/AnonymouskMaster.master";
}
}
}
Saturday, March 9, 2013
Monday, March 4, 2013
Adding extra assemblies to your Sharepoint Solution
Using reusable assembly or Third party assembly in Sharepoint projects
http://wss.made4the.net/archive/2008/06/06/solution-development-in-sharepoint-2007-part-4.aspx
http://wss.made4the.net/archive/2008/06/06/solution-development-in-sharepoint-2007-part-4.aspx
Subscribe to:
Posts (Atom)
