only My site

Wednesday, January 30, 2013

Tuesday, January 29, 2013

There is a problem with the query that the web part is using. Check the configuration of the web part and try again

Error : "There is a problem with the query that the web part is using. Check the configuration of the web part and try again..."

Cause : The Content Query Web Part utilizes the Windows SharePoint Services cross-list querying mechanism to retrieve content from a SharePoint site collection. If the Web Part is configured to issue a query that involves a large number of lists, the cross-list query mechanism may raise an exception.

Resolution :
In order to fix it, you need a more restrictive query or you need to export the .webpart file, modify the ListsOverride property to modify the limit and then use the new imported webpart.
My new lists override property looks like this:
<property name="ListsOverride" type="string"><![CDATA[ <Lists MaxListLimit="2000"> </Lists>]]></property>

By default, cross-list queries have a list limit of 1,000. This means that if you configure the Content Query Web Part with a query that includes more than 1,000 lists, the cross-list query will not complete, and the Web Part will not show any content. The reason for this throttling is to avoid overburdening SQL Server 2005.The more lists the cross-list query includes, the longer it takes for the database server to return the content the query is asking for. For very large numbers of lists, this could cause the database server to disproportionately process cross-list queries at the expense of other requests.
If your requirements involve querying for more than 1,000 lists, you can increase the list limit if the database load that the operations require is acceptable. You can do this by adding a MaxListLimit attribute to the ListsOverride property of the Web Part. For example, if you wanted to raise the list limit to 2000, you would set the ListsOverride property
 

An error occurred during the processing of /OSSSearchResults.aspx. Code blocks are not allowed in this file.

Error : “An error occurred during the processing of /OSSSearchResults.aspx. Code blocks are not allowed in this file.”

Cause : By default the inline server side codeblocks are disabled and we need to enable it in web.config

Resoultion : we need to enable code block in web.config.
 
<SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
<PageParserPaths>
     <PageParserPath VirtualPath="/osssearchresults.aspx" CompilationMode="Always" AllowServerSideScript="true" />
</PageParserPaths>
</SafeMode>


Source : http://blog.pixelmill.com/1037/sharepoint-2010-allow-server-side-code-inline-code-blocks/

Note board webpart - Social Collaboration feature

Monday, January 21, 2013

Property Bag - Scopes

Property bags are place to store metadata or properties.The property bags are implemented as hash table consisting of property names and values.

Property bags can be defined at following levels:
  • Farm (SPFarm class)
  • Web application (SPWebApplication class)
  • Site collection (SPSite class)
  • Site (SPWeb class)
  • List (SPList class) - List,  List item, File, Folder
Specifies a custom property and its value for a property bag of a List item, File, Folder, or Website.

The following is a list of the elements in the Property Bag schema.
<Elements>
<PropertyBag>  - Must be one of File, Folder, ListItem, or Web. Specifies the kind of object to which the property bag belongs.
<Property> - Types are int, string or DateTime.

The example is available at http://msdn.microsoft.com/en-in/library/gg491705.aspx

The following example shows how to add a Location property and its value to the property bag of a website that represents a field office.
<PropertyBag HyperlinkBaseUrl="http://contoso.com/sites/EastEnglandSalesOffice"" Url="" ParentType="Web" RootWebOnly=TRUE" />
    <Property Name="Location" Value="London" Type="string" />
</PropertyBag>
The following example shows how to add a DaysToLive property and its value to the property bag of a list item that represents a temporary price discount. The property specifies how many days the twenty-third list item should be retained before it is deleted from the list. Note that the value of the Type attribute must be a member of the PropertyBagType enumeration. Hence, in this case it must be "int", not "integer".
<PropertyBag HyperlinkBaseUrl="http://contoso.com/sites/EastEnglandSalesOffice"" Url="Lists/CurrentDiscounts" ParentType="ListItem" ItemIndex="23"/>
    <Property Name="DaysToLive" Value="90" Type="int" />
</PropertyBag>

Property bags can be set using SharePoint designer and programmatically.

Set and Get using SharePoint Designer 2010
  • Open Site in SharePoint Designer 2010
  • Go to Site->Site Options
  • Click on Parameters tab where you can see the list of existing properties, from the same place you can even perform add/modify/remove actions.

Set and Get Programmatically
To Read the Set Key:
SPSite siteCollection = new SPSite("");
SPWeb website = mySite.RootWeb;
string MyValue = website.AllProperties["KeyName"]);

To Set the Value
SPSite siteCollection = new SPSite(" ");
SPWeb website = mySite.RootWeb;
website.Properties.Add(" KeyName ", "KeyValue");
website.Properties.Update

Thursday, January 17, 2013

ECMAScript to read Hyperlink URL and description


var context = SP.ClientContext.get_current();
var myListItem = context.get_web().get_lists().getByTitle("ListName").getItemById(1);
context.load(myListItem);

context.executeQueryAsync(
function()
{
    /* On Success */
    alert(myListItem.get_item("HyperLinkFieldName").get_description());
    alert(myListItem.get_item("HyperLinkFieldName").get_url());
},
function(sender,args)
{
    /* On Failure */
   alert(args.get_message());
}
);

Monday, January 14, 2013

Sharepoint Interview Questions

1. Initiation Vs Association, Task Forms difference
2. How the site page renders by IIS
3. Architecture of sharepoint
4. Linked web part
5. K2 Approver workflow
6. K2 Dashboard contents
7. K2 Task webpart
8. k2 Blackpearl version
9. Types of configurations in Sharepoint and its class name
10. Is SPContext is the best way to access the web?
11. Deployment farm solution types and steps - WSP Central admin, Power shell script and STS
12. Loop using SPD Workflow.
13. Can a single web part can act as a consumer and provider
14. Consumer and provider base class and override methods
15. There are 2 wsps (Package A and Package B). Package B has dependency on Package A and we need to make sure Package A is installed before installing Package B. How to implement this?

What are the types of authentication available for SharePoint 2010?
1. Claims
2. Windows
3. Form Based Authentication 

What is the difference between Classic mode authentication and Claims-based authentication?
As the name implies, classic authentication supports NT authentication types like Kerberos, NTLM, Basic, Digest, and anonymous. Claims based authentication uses claims identities against a against a trusted identity provider.


When would you use claims, and when would you use classic?
Classic is more commonly seen in upgraded 2007 environments whereas claims are the recommended path for new deployments.

What are different types of Term Sets?

There are Local Term Sets and Global Term Sets, one created within the context of a site collection and the other created outside the context of a site collection, respectively.
 
What Is Governance in terms of SharePoint 2010?
Governance is the set of policies, roles, responsibilities, and processes that guide, direct, and control how an organization’s business divisions and IT teams cooperate to achieve business goals.


SharePoint Interview Q&A
http://sharepointknowledgebase.blogspot.in/2011/09/what-is-sharepoint-sharepoint-2010-is.html

 

Wednesday, January 9, 2013

Visual Source Safe : Could not find the visual SourceSafe internet web service connection information. SourceSafe web service cannot be accessed.

Today one of my team member tried to open a solution from VS2010 and which is hosted in VSS server. During the time he opens the solution the VSS Server was switched off (offline) and he was promted with multiple options (of course, the system couldn't connect to the shared folder database) and he choode "work offline" mode and opened the solution.

Lates the VSS server was Switched on (online) and he tried to open the .net project solution .sln , and this time he got the following error.

"Could not find the visual SourceSafe internet web service connection information. SourceSafe web service cannot be accessed."

Solution :

Go to the Visual Studio -> Tools -> options -> Choose Source Control and Plug-in Selection.
Switch Back to Microsoft Visual SourceSafe instead of Microsoft Visual SourceSafe(Interenet);

For VS2010 Premium and Ultimate
Go to the Visual Studio -> Debug -> Options and Settings -> Choose Source Control and Plug-in Selection.  Switch Back to Microsoft Visual SourceSafe instead of Microsoft Visual SourceSafe(Interenet);

Note : The scenario above I mentioned is based on my friend's Information.

Tuesday, January 8, 2013

VSS 2005 and VS2010 Integration

Issue :

I was looking to configure the VSS 2005 in Tools -> Options -> Source Control and it was not there in VSS 2010 Ultimate edition.

Resolution :

Note that in Premium and Ultimate version the path to change to VSS is through DEBUG -> OPTIONS AND SETTINGS -> SOURCE CONTROL

To configure VSS2005 with VS2010 we can change the settings in Tools-> Options-> Source Control-> Select the Vss Source Safe option. Note that in Premium and Ultimate version the path to change to VSS is through  DEBUG -> OPTIONS AND SETTINGS -> SOURCE CONTROL