21 February, 2013

The super reader account utilized by the cache does not have sufficient permissions to SharePoint databases



Let me brief some details as what exactly happened in reference to following error message:
Object Cache: The super reader account utilized by the cache does not have sufficient permissions to SharePoint databases.

We have moved one web application from Development to staging environment. Movement was successful and we started facing the above mentioned error while browsing the web application.

After viewing the error message, thought process started to resolve around permissions.
Okay, but which permissions, account, sections where we need to specify and so many things…

Opened central administration—manage web applications—click on the specific web application to check the permissions –three accounts were listed there: nt authority, two more accounts and all are in Read Only mode.

Checked the IIS settings for that web application and cross checked the same account listed or not (which we have seen in the CA-user policy for that application)
Checked the account permissions in reference to SQL Databases and its perfectly fine (already listed in the users and roles in SQL)

As per Microsoft recommendations, there should be a Portal Super User account that must be an account with Full Control access to the Web application and The Portal Super Reader account that must be an account with Full Read access to the Web application.


While doing some research, I came across with an excellent article, written by Andras Gaal
 
The above article resolves my issue and works perfectly fine for us.

I would like to put some stress on one point from the same article:
 If you are in claims mode, you will need to use the claims user name(i:0#.w|domain\user).

Make sure you make a note it as it will creates new exceptions…

Thank you.

Code Blocks are not allowed in this file error in sharepoint 2010



Hello Everybody,
Today I worked on one critical issue which belongs to our development environment. We have migrated one web application from production environment to development for testing purpose. Migration has been successful but we were facing an exception while browsing the web application.

Error Message:
An error occurred during the processing.
Code blocks are not allowed
Troubleshoot issues with Microsoft SharePoint Foundation.

Server Configuration:
·         2 SharePoint Servers
·         SQL server 2008 R 2
·         Windows Server 2008 R2
·         SharePoint Version: SP2010

Troubleshooting done:
1.    Tried accessing the system pages i.e. settings.aspx, viewlsts.aspx etc. every system was opening fine without any issues. So the issue is with the home page only…
2.    Tried accessing the web part maintenance page, it opened without any issues. We closed the webparts which are present on the home page-just to make sure that there is no problem with the existing webparts. Checked the home page again but same issue.
3.    Tried changing the master page as were able to open the system pages (by appending _layouts/changesitemasterpage.aspx). We changed to different one as we are using custom master page. Checked the results again but same problem.
4.    Opened the site in SharePoint Designer 2010 and checked the status of master page as well as the home page. It was fine and without customization too.

Note: if you see any of these pages in customizable state then I would suggest you to take the backup and try ‘reset to site definition” option.

Obviously, next question will arise- what exactly it will do? Yes, it will reset your page to default state. It means you will lose your customizations. But issue will be resolved and you can customize the page again as per your requirements.

5.    Checked the windows application as well as SP logs (Location: \14\Logs). I would suggest you to analyze these logs before continuing your troubleshooting.

What is my observation\Understanding?
·         Code blocks are only processed for custom pages deployed in the root virtual directory of a site if the code it considered safe.
·         This code is considered safe only if the page is served directly from the file system. As soon as it becomes unghosted for any reason, the code is no longer considered safe and the error shown in the symptom occurs.

Resolution:
As our production web application was working without any issues so I compared the web.config of both the applications. Analyze the code line by line with the production web.config and that’s it. I found the one which was missing in the web.config that belongs to my development web application.

Note: I would suggest you to take a proper backup before making any changes in the web.config file.

What I did? What kind of entries I added in the web.config file?

Here we go:-
In you web.config, you need to search the tag name as “<PageParserPaths>”
Once you find that then make the following  entry:
<PageParserPaths>
    <PageParserPath VirtualPath="/apps/*" CompilationMode="Always"
              AllowServerSideScript="true" IncludeSubFolders="true" />
</PageParserPaths>
After adding this entry then IISRESET is mandatory.

Tried accessing the site and the issue has been resolved.

Happy SharePoint once again…

If you have any queries/questions regarding the above mentioned information then please let me know, Thank you.

20 February, 2013

Hide column on Newform.aspx. In SharePoint

Issue: Client reported that on newform.aspx page, there is one column which appear for awhile and then disappears.
Troubleshooting:
-          Checked if the column is custom created.
-          Checked if the column has its value hidden in the content type column setting.
-          Marked the column value to be required.
-          Saving the list as template without content and worked fine on the other site, gives issue on the same site.
-          Tried deleting the problem column form the problem list, its still disappears from the newform.aspx page.
-          Checked the list in SharePoint Designer to check if the newform.aspx page is customized. No customizations were implemented.

Resolution:
On further troubleshooting, we edited the new.aspx page and found two ‘content editor webpart’ each containing a Java script code.
Out these two codes one was like given below:
           
Where nth-Child is used as an argument to pass to the table and function to perform is hiding.
The 8th number is the column number in the newform.aspx page. Editing the page and changing the number equivalent to the number of the column would hide that column from the page.
Either changing the number to something to not equal to the column number or removing the code had resolved the issue.
Applies to:
-          SharePoint 2007
-          SharePoint 2010.
-          SharePoint Designer.  

Disk space mismatch than the actual size allocated on disk.

Issue: Today while doing our regular BAU of monitoring the server space. I have got a Tivoli alert which is configured to alarm you when there is low disk space. 
Issue was while looking at the drive space the total of 199 GB was showing as used space and total storage space occupied by files and folder was 58 GB on the drive.  Where is the rest of the space occupied. Strange….???
Troubleshooting:
-          Unhide the system hidden files. Not occupying the space.
-          Checked the file size of the files and folder stored. Not occupying the space.
-          Checked the Volume shadow copies of the all the drives. No disk is mounted to be used as Shadow copies. All drive status is set to ‘Disabled’.
Resolution:
Came across a very nice article which talks about the various ways to check if there is a mismatch in the drive space.
Step 6 from the above article was the resolution for my problem.
-          Running VSSADMIN LIST SHADOWSTORAGE to find out, which drive is having the total used space as a volume shadow copy.

-          132 GB of storage space was occupied by C Drive.
-          Limiting Maximum size of the storage area in Shadow copies had releases the space allocated.

Applies to:
Windows Server 2008
Windows Server 2003.

Problem Description: SharePoint shows network break/unknown error very frequently (on average 3 on 5 days in week. Client end up trying the file upload 4-5 times to do it (each iteration being of 10 min. each)


Problem Description: SharePoint shows network break/unknown error very frequently (on average 3 on 5 days in week. Client end up trying the file upload 4-5 times to do it (each iteration being of 10 min. each)
Error Message: Server request timed out. Please try again or the network connection with the server has been lost. Please try again.
Troubleshooting done:
ü  Checked how big the file is? It’s around 25 MB. We have upload limit of 100 MB in our farm.
ü  What is the name of the Library name?
ü  How is client trying to upload the file? Client was using both upload document” or “upload multiple documents” option for file upload on the site.
ü  Tried adding a entry in the host file and checked and no go.
ü  Removed the user from all people still the user gets all the options and is able to get to the option of upload, did not find the user in any DL.
ü  Added the use as a site collection admin still no go.
ü  Cleared the cache still the same.
ü  Added back the permissions removed of the user.
ü  Ran the office diags no go.
ü  It works from a different machine.
ü  On the other machine on the first document library it works always. On the second library it works sometimes.
ü  Cleaned the temp folder which was 680 MB and could upload the file for the first time, second, the transfer rate he experience in upload is about 20 kbps whereas other colleagues are able to transfer files to SharePoint at about 150+ kbps.
ü  Suggested client that transfer rate could also depend upon the network speed or the internet bandwidth. And local LAN support could assist him better in increasing the transfer rate.
ü  Tried uploading the 14 MB file from ‘Upload multiple file’ option. And waited for 10 Min and get error message ‘The network connection with the server has been lost. Please try again.’
ü  Noticed while uploading the file the transfer rate of the upload was 40 kbps, and client did notice the upload transfer rate as 150 kbps for his other colleagues.
ü  Network card is configures to run on 100 mbps.
ü  Tried to upload a little less sized file of 9 MB on another site. It also did take same amount of time.
ü  Working on another machine for the client doesn’t take much time to upload the file for one site.
ü  It seems it is related to the network bandwidth issue.

Resolution: Changing the LAN settings to be 100 mbps full duplex it makes the things working fine. It was set to 10 mbps something. To change the settings go to
My Computer (right click properties)&gt; Hardware &gt; Device Manager &gt; LAN settings.
Applies to: SharePoint 2007, SharePoint Server 2010.