Showing posts with label Web.Config. Show all posts
Showing posts with label Web.Config. Show all posts

Monday, March 31, 2014

BLOB cache for Sharepoint

BLOB cache for Sharepoint

Blob cache is used in Sharepoint that to cache the Larger files.In the below Article I explained in very details About the Caches

http://expertsharepoint.blogspot.de/2013/10/to-tune-sharepoint-2010-for-better.html

BLOB Cache/Disk-based caching controls caching for binary large objects (BLOBs) such as image, sound, video, and some static content files like CSS. Disk-based caching is fast. It eliminates the need for database round trips. BLOBs are retrieved from the database once and stored on the Web client. Further requests are served from the cache and trimmed based on security. 

How to enable BLOB caching:

1.   BLOB Cache needs to be enabled from Web.Config.
2.   Make sure that there is enough space in the drive/server where blob cache is stored.
3.   It’s important to understand that BLOB cache is per-machine. So make sure that the BLOB cache settings are consistent across the whole farm. You don’t want one server with 1 GB of BLOB cache and another server with 4 GB of BLOB cache. You might see strange and inconsistency in performance if you don’t configure BLOB cache consistently.
4.   By default, the disk-based BLOB cache is off and must be enabled on the front-end Web server.
5.   In order to enable BLOB cache, locate the Web.Config for the web application and edit it.
6.   The recommended approach for making such changes in Web.Config file is through a feature receiver or PowerShell by making use of SharePoint’s SPWebConfigModification class.

In the Web.Config file, find the following line: 

<BlobCache location="" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv)$" maxSize="10" enabled="false" />

In this line, change the location attribute to specify a directory that has enough space to accommodate the cache size.


To add or remove file types from the list of file types to be cached, for the path attribute, modify the regular expression to include or remove the appropriate file extension. If you add file extensions, make sure to separate each file type with a pipe (|), as shown in this line of code.

To change the size of the cache, type a new number for maxSize. The size is expressed in gigabytes (GB), and 10 GB is the default. It is recommended that you not set the cache size smaller than 10 GB. When you set the cache size, make sure to specify a number large enough to provide a buffer at least 20 percent bigger than the estimated size of the content that will be stored in the cache.

To enable the BLOB cache, change the enabled attribute, from "false" to "true".

<BlobCache location="E:\DATA\BlobCache" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="1" enabled="true" />

After enabling blob cache in web.config, do an IISRESET and browse to the /settings.aspx first, instead of home page (Collaboration portal site).
When we browse to the settings.aspx, it will create the following files change.bin, dump.bin and flushcount.bin (all the files will be 1KB in size).
Browse to the home page now, it will create a folder PUBLISHINGIMAGES, all the images rendered from the database will be stored here and the above bin files will also get updated (we can see the difference in file size)
You can use an STSADM command to flush all BLOB caches associated with a specified Web application on different Web front-end computers on the farm:  

stsadm –o setproperty –propertyname blobcacheflushcount –propertyvalue 11 –url http://mywebapp::port



Please Comment if you need Any Help.Your Feed back is always Welcome.I Am Happy to Help !!!!!

Wednesday, February 5, 2014

Web.config files in SharePoint

Web.config files in SharePoint
                            


web.config files are contained in the following folders within the file system, I am giving A brief explanation on which web. Config do what as per my experience.

1.    Local Drive:\Inetpub\wwwroot — The web.config file of the top-level content root folder that defines configuration settings for the virtual server of the default Web site in the Windows SharePoint Services deployment. In addition, the content root folder includes a \wpresources folder that contains a web.config file used in Web Part resources.

2.    Local Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources — A web.config file that is used in Web Part resources for the Global Assembly Cache (GAC).

3.    Local Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12,14 or 15\CONFIG — The web.config file and other .config files that together define configuration settings for extending other virtual servers.

4.    Local Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12,14 or 15\ISAPI — The web. Config file that defines configuration settings for the /_vti_bin virtual directory.

5.    Local Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12,14 or 15\TEMPLATE\LAYOUTS — The web. Config file that defines configuration settings for the /_layouts virtual directory.

6.    Local Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12,14 or 15\TEMPLATE\ADMIN\Locale_ID — The web. Config file that defines configuration settings for pages used in SharePoint Central Administration.

When a virtual server is extended with Windows SharePoint Services, a top-level web. Config file is placed within the content root folder of the extended virtual server, which defines configuration settings for the server such as HTTP handling for Web Parts. Another web. Config file used for Web Part resources is placed in a \wpresources folder within the same content root folder.

Important  The web. Config files in the \wpresources folders should not be modified. The settings of these files disallow pages or items that can be compiled. If these settings are changed, the security state for the compiled code will be very different from the security state for code that runs from the Local Drive:\Inetpub\wwwroot directory.



Please Comment if you need Any Help.Your Feed back is always Welcome.I Am Happy to Help !!!!!

Friday, January 3, 2014

HTTP 500 Internal Server Error in SharePoint 2013

 HTTP 500 Internal Server Error in SharePoint 2013

                            


issue with one of web site created.

Issue: Website cannot display the page due to HTTP 500 Internal Server Error.
 I tried to do  open SharePoint Central Administration, to see if I get the same error message. Strangely, I was able to open Central Administration without any errors.

  
I opened IIS Manager to make sure SharePoint – 80 Application Pool was running, and I noticed that SecurityTokenServiceApplicationPoolapplication pool was stopped.
                      


 I started SecurityTokenServiceApplicationPool application pool, refreshed my SharePoint site but that didn’t resolve the issue. I opened IIS manager and noticed
that SecurityTokenServiceApplicationPool was stopped again.

I Check the  IIS events log to check what’s the issuewith SecurityTokenServiceApplicationPool application pool

 The IIS event log showed the warning ID 5021:
The identity of application pool SecurityTokenServiceApplicationPool is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives its first request.  If batch logon rights are causing the problem, the identity in the IIS configuration store must be changed after rights have been granted before Windows Process Activation Service (WAS) can retry the logon. If the identity remains invalid after the first request for the application pool is processed, the application pool will be disabled. The data field contains the error number.
In order to resolve this problem I navigated back to IIS manager 

SecurityTokenServiceApplicationPool application pool-> Advanced Settings.
                     

 Navigated to the Identity option.
                                                


Updated the user’s credentials and clicked on OK.       
         


I performed iisreset.
  
And opened IIS manager again to check if it

worked. SecurityTokenServiceApplicationPool was now started and didn’t stop anymore.
  
My SharePoint 2013 site was working again!
 Please Comment if you need Any Help.Your Feed back is always Welcome.I Am Happy to Help !!!!!

Thursday, December 12, 2013

Internet Explorer cannot be display the web page or A process serving application pool 'SharePoint Central Administration v4' exceeded time limits during shut down

   Internet Explorer cannot be display the web page

  Issue: shows the error “Internet Explorer cannot be display the web page” After Creating web site in SharePoint 2010,2013.

   Event Error in System Log:

·       Log Name:      System
·       Source:        Microsoft-Windows-WAS
·       Date:          12/12/2013 12:13:47 PM
·       Event ID:      5013
·       Task Category: None
·       Level:         Warning
·       Keywords:      Classic
·       User:          N/A
·       Computer:     
·       Description:
·       A process serving application pool 'SharePoint Central Administration v4' exceeded time limits during shut down. The process id was '8776'.

   Cause: As more and more web applications are created, the time in which it takes to create a web application increases. As part of the creation process, IIS is reset and by default, the application pool allows 90 seconds for the connections to close off before forcibly shutting down. When the number of web applications grows above 10, 90 seconds is not enough time for the provisioning to finish.

   Resolution: please follow the below steps to increase the time limit.

1.    Go to run->type Inetmgr->Application pools            
2.    Select Central administration Application pool
3.    Rt click on Apppool->go to Advanced settings    
4.    Check for the Shut down time limit under process model.
5.    set the Shutdown Time Limit to a greater value. As an example, 300.                        



6.    Restart IIS.



Please Comment if you need Any Help.Your Feed back is always Welcome.I Am Happy to Help !!!!!

Tuesday, December 3, 2013

Unable to create Website. Giving the Error” Server Error in’/’ Application

  Unable to create Website. Giving the Error” Server Error in’/’ Application

   Issue: After changing the Password in AD, Not able to create the website. “Keep Saying working on it”


  Event ID: below is the Event generated in Application Log every time creating web site.

·         Log Name:      Application
·         Source:        ASP.NET 4.0.30319.0
·         Date:          12/3/2013 3:37:00 PM
·         Event ID:      1309
·         Task Category: Web Event
·         Level:         Warning
·         Keywords:      Classic
·         User:          N/A
·         Description:
·         Event code: 3005
·Event message: An unhandled exception has occurred.
·Event time: 12/3/2013 3:37:00 PM
·Event time (UTC): 12/3/2013 7:37:00 AM
·Event ID: 2405866b68204f8caf1e3417975cb08f
·Event sequence: 119
·Event occurrence: 2
·Event detail code: 0
· Exception message: The password supplied with the username was not correct. Verify that it was entered correctly and try again.
·         at Microsoft.SharePoint.Administration.SPFarm.ValidateLogonAccount(String& username, SecureString password)
·         at Microsoft.SharePoint.Administration.SPManagedAccount.Verify()
·         at Microsoft.SharePoint.Administration.SPProcessAccount.ValidateLogonAccount()
·         at Microsoft.SharePoint.Administration.SPWebApplication.CreateDefaultInstance(SPWebService service, Guid id, String applicationPoolId, SPProcessAccount processAccount, String iisServerComment, Boolean secureSocketsLayer, String iisHostHeader, Int32 iisPort, Boolean iisAllowAnonymous, DirectoryInfo iisRootDirectory, Uri defaultZoneUri, Boolean iisEnsureNTLM, Boolean createDatabase, String databaseServer, String databaseName, String databaseUsername, String databasePassword, SPSearchServiceInstance searchServiceInstance, Boolean autoActivateFeatures)
·         at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
·         at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

   Cause: set the managed account and creating the web app with the managed account.The changed password was not updated in the managed account.

  Resolution: Follow the below steps to change the Updated password for managed account.

·        Go to Central admin->security->general security->configure managed account->

    


·        Click the Edit->check the box on  Change password now->use Existing password->provide the Changed password->click OK.

     



·        Try to create a web site, This time you can successes.


   Environment: SharePoint 2010,2013

Please Comment if you need Any Help.Your Feed back is always Welcome.I Am Happy to Help !!!!!

Monday, December 2, 2013

Server Error in’/’ Application

  Server Error in’/’ Application 
                                                           

      Issue back ground: when open the Central administration page, It shows the Error.

          Exception Details: System.InvalidOperationException: This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database. To connect this server to the server farm, use the SharePoint Products Configuration Wizard, located on the Start menu in Microsoft SharePoint 2010 Products
                

Cause: We are using the same account for DB and SharePoint. we Changed the  password for the account but not updated for SQL services.issue is due to the password for the account used in SQL. The changed PWD not updated in the SQL services

   

     Resolution: 

1.     Check the permissions for the account on SQL DB server
2.      If the account has Specific permissions alreday,check for whether the password was changed recently for the account or not.If changed the passowrd, Then Update the  password in the SQL services        
                   
·       Go to Run->Services.msc-> Find the SQL server,SQL server Agent(Change the Updated PWD)
                                                                                                                

Please Comment if you need Any Help.Your Feed back is always Welcome.I Am Happy to Help !!!!!

ShareThis

X