Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:

Recycle Bin | MMS | ManagedVsCrawledProperties |

Monday, June 4, 2012

Common issues in SharePoint 2007/2010

 I have got many issues while working on SharePoint 2007/2010. Here are few and main basic issues I am sharing: 

1. This view cannot be displayed because the number of lookup and workflow status columns it contains exceeds the threshold enforced by the administrator
2. No item exists at... It may have been deleted or renamed by another user.

3. Invalid data has been used to update the list item. The field you are trying to update may be read only.
4. Cannot connect to the configuration database?
  • I got this error suddenly when I tried to open the site.
  • Sol: The problem is the Sqlserver DB servers are in off mode. So, start the below list of servers to work.
  • Go to “Run” command√†enter “services.msc”√†start the “SQL Server (MSSQLSERVER) and SQL Server Agent (MSSQLSERVER). Refresh the site… 
5. Code Blocks are not allowed in this file.
  • Error: I have created site pages through SharePoint designer and added the inline code inside of “Script” tag and after that if I tried to view this page I got this error “An error occurred during the processing of /Pages/Sample.aspx. Code blocks are not allowed in this file”.
  • Affected files: i.e. Master pages and Page layouts.
  • Reason: SharePoint disables the ability to create server-side script by default; you have to turn it on. To get this working you need to modify the web.config of your web application. 
  • Sol:
//To allow script code to the specific page
< PageParserPaths >
  < PageParserPath VirtualPath=”/Pages/Sample.aspx” CompilationMode=”Always”
                                  AllowServerSideScript=”true” />
//To allow script code to all the pages
  <PageParsePath VirtualPath=”/Pages/*” CompilationMode=”Always”
                                  AllowServerSideScript=”true” />
< PageParserPaths >
//To allows Script to the Master Pages.
 <PageParserPath VirtualPath="/_catalogs/masterpage/Sample.master" CompilationMode="Always" AllowServerSideScript="true" />
//To enable code blocks on a Folder
<PageParserPath VirtualPath="/TeamSite/CustomForms/*"
    CompilationMode="Always" AllowServerSideScript="true"  IncludeSubFolders="true"/>

  • AllowServerSideScript, IncludeSubFolders” are self-explanatory and “CompilationMode” attribute have the following options
    • Always – The default value, which compiles the page always
    • Auto – Page will not be compiled if possible
    • Never – The page will not be dynamically compiled
6. This solution contains no resources scoped for a web application and cannot be deployed to a particular web application
  • Sol: The above issue will occur if your solution does not contain assembly information (means no GAC files) to the scoped to the web application.
  •  Sol: stsadm –o deploysolution –name “Sample.wsp” –local –allowgacdeployment –force
7. Object reference not set an instance.
8. Invalid data has been used to update the List Item. The field you are trying to update may be read-only field.
  • Sol: In SharePoint, “Created By” and “Modified By” fields (columns) are read-only fields. These two read-only fields are built-in field for every list and library. We cannot directly update/Modify read only field, if you try to Update/Modify you will get the below error.
  • “Invalid data has been used to update the List Item. The field you are trying to update may be read-only field”.
  • Sol:  we can do changes on “Read-Only” fields using internal names.
  • Internal name of “Created By” field is “Author” and “Modified By” field is “Editor
SPList ListName= CurrentWeb.Lists[“ListName”];
SPListItemCollection lstitemcollection = ListName.Items;
Foreach(SPListitem listitem in lstitemcollection)
  SPFieldUservalue user1=new SPFieldUservalue(CurrentWeb, CurrentWeb.Currentuser.ID,  
  ListItem [“Author”]=user1;
  ListItem [“Editor”]=user1;
9. Operation is not valid due to the current state of the object when making changes to SPListItem object using Elevated Privileges?
  • Sol: This issue will get when running “SPListItem.Update command” inside of the “SPSecurity.RunWithElevatedPrivileges” block. 
10. "The farm is unavailable” message
11. SharePoint Connection Error in Visual Studio 2010.
 12. Choice column not supported for lookup field.  
13. The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold enforced by the administrator.
14. Error occurred in deployment step ‘Retract Solution’: The local SharePoint server is not accessible. Check that the server is running and connected to the SharePoint farm.  

Please share your experience to keep all issues in at one place.

Thanks for reading..

No comments:

Post a Comment