|
Namwar Rizvi Profile |
|
|
What is SharepointSystem account?
Namwar Rizvi Many people ask this question that what is SharePoint\System account? So here is the answer:
SHAREPOINT\System account is the same account used by application pool of your SharePoint web application in IIS at the time of creation/extension of respective web application.
This is the account which is used when you run your code in under elevated privileges by SPSecurity.RunWithElevatedPrivileges.
When you create/extend a web application in SharePoint and specify an Application Pool then the i [read]. Posted: Sun, Sep 5th '10 |
Solution for JavaScript Error on Search Results Page in SharePoint
Namwar Rizvi One of my clients reported that they have started getting “Object Expected” javascript error whenever they click on any link in Search Results of SharePoint. This was quite odd as the search results page was the out of the box search result page without any customization (…well up till now )…
After investigating the issue, I found out that client had deleted the “Search Box” web part from the search results page as they don’t want user to search again f [read]. Posted: Tue, Aug 24th '10 |
Solution for “Invalid URL value. A URL field contains invalid data. Please check the value and try again”
Namwar Rizvi If you try to update field of type SPUrlField in SPListItem, you may encounter “Invalid URL value. A URL field contains invalid data. Please check the value and try again” error. This error can occur due to several reasons. I found a good description in a Microsoft SharePoint forums by Somak Bhattacharyya . I found it quite useful and hope it will help you to fix this issue:
The URL that you are creating doesn’t exceed 255 characters. This is because the Hyperlink type colu [read]. Posted: Fri, Aug 13th '10 |
How to hide User Name from SharePoint Lists
Namwar Rizvi Sometimes we need to hide the Created By, Modified By user names in display pages of SharePoint. This requirement mostly come in Surveys where you do not want to show who answered the survey.
You can hide this information from being displayed by setting ShowUser property of SPList object to false.
Following is a code example of doing it:
using (SPSite s = new SPSite("Your Site URL"))
{
using (SPWeb w = s.OpenWeb("Your Web URL"))
{
SPList lib = w.Lists["Name of Your Target SharePoint List"];
lib [read]. Posted: Thu, Aug 12th '10 |
How to solve “Code blocks are not allowed in this file” error?
Namwar Rizvi Hi,
if you are getting “Code blocks are not allowed in this file” error while browsing a page in SharePoint then it is because SharePoint disables the server code in script block. This is to make sure that no one should just upload an aspx page with malicious server side code and execute it to kill the SharePoint server :)
OK, got it….now tell me how to allow server code in a specific page?
Here you go, just add following PageParserPath nodes under PageParserPaths node. Refe [read]. Posted: Mon, Aug 9th '10 |
What is ECM and how it relates to SharePoint?
Namwar Rizvi There are lot of confusions surrounding the terms ECM (Enterprise Content Management System). Just Google it and you will find thousands of definitions but IMHO they all will confuse you further
Being a SharePoint technologist, you must have a fairly good idea about these terms and what they actually mean to any organization. To understand the ECM concept, some fundamental points needs to be understood:
An information is any thing i.e. Emails, Tasks, Files (Physical or electronic), Contact [read]. Posted: Thu, Aug 5th '10 |
SharePoint 2010 Administration Toolkit V1 is released
Namwar Rizvi Microsoft has released the SharePoint 2010 Administration Toolkit V1. This toolkit enables administrators to :
better manage User Profiles data,
reduce security vulnerabilities,
establish two way connection of SharePoint with any CMIS compliant repository
Load test SharePoint Foundation
I need more information before I can decide…..
Detailed documentation is available at:
SharePoint Foundation 2010: http://technet.microsoft.com/en-us/library/cc508986.aspx
SharePoint Server 2010: http:/ [read]. Posted: Mon, Aug 2nd '10 |
Powershell script to enable Sandbox solution on Domain Controller
Namwar Rizvi If your SharePoint 2010 development machine is also a domain controller then by default Sandbox solutions are disabled on it. To enable it, you need to run the following powershell script:
$acl = Get-Acl HKLM:\System\CurrentControlSet\Control\ComputerName
$person = [System.Security.Principal.NTAccount]“Users”
$access = [System.Security.AccessControl.RegistryRights]::FullControl
$inheritance = [System.Security.AccessControl.InheritanceFlags]“ContainerInherit,ObjectInherit”
$propagation = [read]. Posted: Mon, Jul 26th '10 |
How to edit source in SharePoint 2010 Content Editor Web Part (CEWP)?
Namwar Rizvi If you are like me and wondering what happened to Edit Source option of Content Editor Web Part i.e. CEWP in SharePoint 2010 then don’t worry, it has moved to Ribbon.
Here is how you will edit source
Click in the empty area of CEWP
Under Editing Tools, click HTML and then Edit HTML Source as shown below. [read]. Posted: Mon, Jul 19th '10 |
SharePoint 2010 Certification Details
Namwar Rizvi For those of you who are waiting for SharePoint 2010 certifications, here are the links to find all the details about them:
Developers:
Exam 70-573: TS: Microsoft SharePoint 2010, Application Development
Exam 70-576: PRO: Designing and Developing Microsoft SharePoint 2010 Applications
Administrators:
Exam 70-667: TS: Microsoft SharePoint 2010, Configuring
Exam 70-668: PRO: Microsoft SharePoint 2010, Administrator [read]. Posted: Thu, Jul 1st '10 |
How to generate a valid SharePoint FileName
Namwar Rizvi SharePoint imposes several restrictions for the filenames. To get the details of all these restrictions, please check this support article from Microsoft. I have created a utility function to convert a given string to a valid SharePoint filename. This function is valid for SharePoint 2003, 2007 and 2010. Here you go
public string ConvertToValidSharePointFileName(string originalFileName)
{
char[] InvalidFilenameCharacters = new[] {'\\', '/', ':', '*', '?', '"', '', '|', '#', '{', '}', '%', '~' [read]. Posted: Thu, Jun 17th '10 |
How to solve never ending “Sleeping for 10 seconds” upgrade message of SharePoint
Namwar Rizvi While performing upgrade, sometime SharePoint got stuck and continously log message “Sleeping for 10 seconds…” in Upgrade.Log . To solve this issue, just perform following two steps
End the task psconfig.exe,if it is running, from task manager.
From command prompt, execute the following command psconfig -cmd upgrade -inplace b2b -wait -force
Wait to complete the upgrade. Once done, just browse your SharePoint site as usual, it will be back again:) [read]. Posted: Sun, Jun 13th '10 |
How to find Microsoft.SharePoint.ApplicationPages.dll and some other assemblies
Namwar Rizvi You may be wondering where to find Microsoft.SharePoint.ApplicationPages.dll , if you are creating a new SharePoint application page? But don’t worry, it resides in _app_bin folder of your SharePoint site’s virtual directory.
Assuming your IIS inetpub is at C then the exact path of Microsoft.SharePoint.ApplicationPages.dll is
C:\Inetpub\wwwroot\wss\VirtualDirectories\\_app_bin\Microsoft.SharePoint.ApplicationPages.dll
Here is the full list of assemblies at _app_bin folder:
Microsoft [read]. Posted: Sat, Jun 12th '10 |
How to create a general purpose Search Results ticker in SharePoint by jQuery
Namwar Rizvi Business Problem
Display SharePoint search results as a scrolling ticker.
Solution:
SharePoint has two very powerful web parts Search Core Results WebPart and Content Editor WebPart . By combining these two web parts along with some jQuery and jCarousel Lite plug-in we can achieve desired results very quickly. The technique described here is very generic and can be used in CQWP and other web parts too.
What we are doing is quite simple. We use jCarousel plugin for jQuery to scroll the elemen [read]. Posted: Fri, May 21st '10 |
Welcome to SharePoint 2010 – Join Virtual Launch Events
Namwar Rizvi Microsoft is launching SharePoint 2010 today. It will be one of the biggest releases of SharePoint up till now. Join the virtual launch event of SharePoint 2010 at
http://sharepoint2010launch-virtual.wikispaces.com/ [read]. Posted: Tue, May 11th '10 |
Solution for Zero Byte SharePoint 2010 Log files
Namwar Rizvi If your SharePoint 2010 Log files are of zero byte i.e. SharePoint is unable to record the Log information then perform the following steps to resolve it
Make sure the login account of “Windows SharePoint Services Tracing V4” is member of Local Administrators group.
Make sure you have restarted the “Windows SharePoint Services Tracing V4” service after performing step 1. [read]. Posted: Sun, Apr 4th '10 |
How to solve Missing Server Side Dependencies – 8d6034c4-a416-e535-281a-6b714894e1aa Error?
Namwar Rizvi After installing SharePoint 2010 Beta, you may encounter “Missing Server Side Dependencies – 8d6034c4-a416-e535-281a-6b714894e1aa” error in SharePoint Cental Administration. It is a very weird error and there is no logical reason behind it:) Microsoft may fix it in the final release of SP2010. Until then here is the solution:
Navigate to SharePoint Central Administration Page
Click General Application Settings on left hand side Quick Launch bar
Under Search, click Farm-Wide S [read]. Posted: Sun, Apr 4th '10 |
Access Denied for SharePoint Site Owner
Namwar Rizvi There are times when SharePoint can even deny the Site Owner to access his/her site. There are numerous reasons behind this issue but I just want to give you the solution. So here it is:
Step 1:
Run following stsadm command after replacing place holders, mentioned in , by actual values:
stsadm -o siteowner -url -ownerlogin
Step 2:
Run following stsadm command after replacing place holders, mentioned in , by actual values:
stsadm -o siteowner -url -ownerlogin
Thats it. Now access the si [read]. Posted: Wed, Feb 24th '10 |
How to debug Email Event Receiver
Namwar Rizvi Normally when you debug an event receiver in SharePoint, you attach your debugger with w3wp.exe process. But email received event is not processed by this process.
Instead, you need to attach your debugger with OWSTIMER.exe process. This is the “Windows SharePoint Services Timer” service.
If this process is not listed in your processes list then click on “Show processes from all users” to display all processes similar to following: [read]. Posted: Thu, Jan 14th '10 |
How to dynamically construct the SharePoint site relative url in JavaScript
Namwar Rizvi There are times when you want to dynamically construct a SharePoint site relative Urls e.g. if you are calling a SharePoint webservice from JQuery etc. then you will need to call it in context of your required site.
Most people try to slice and dice the URL of the current page and try to find the SharePoint site from it. This is not a very clean way of doing it.
The more easy and clean way is the way SharePoint itself does which is using the JavaScript variable called L_Menu_BaseUrl
This variab [read]. Posted: Fri, Jan 1st '10 |