Friday, March 29, 2013

Errors In SharePoint

Service Unavailable: HTTP Error 503. The service is unavailable in SharePoint

Service Unavailable: HTTP Error 503. The service is unavailable error normally occurs whenever the password for application pool identity account is changed or application pools are in stopped state. This error may appear temporarily when you deploy solutions. In my case, I realized that password got changed for the Identity account.
Its a best practice to set "Password never expire" option for service accounts.
Here are the steps to resolve:
SharePoint Error: Service Unavailable: HTTP Error 503. The service is unavailable in SharePoint
If you are Running SharePoint in Windows 2003:
  • Go to Start -> All Programs -> Administrative Tools -> Internet Information Services (IIS) Manager.
  • Locate your App Pool account and right-click on it and select ‘Advanced Settings’.
  • Go to process model then Identity Click on the Identity ->Set and then give the user name, password and confirm password.
Hope this will work fine after that.

Here is the Microsoft KEDB: http://support.microsoft.com/kb/823552

If you are Running SharePoint in Windows 2008:
  • Go to IIS Manager (Start > Administrative Tools > Internet Information Services Manager)
  • Expand the server node, and Click on Application Pools
  • Locate the Application Pool of the SharePoint site, If it is stopped - Start it. If the password is changed, update the password:
    • Click on "Advanced Settings" Setting Application Pool Identity in IIS
    • and then click on ... Button in Identity property
    • Set Application Pool Identity in IIS
    • Enter the User Name and password for the application Pool account.
    • Set Application Pool Account User Name password in IIS
It could happen when the App pool's Advanced Property: Enable 32-Bit Applications is set to "True"! It should be false.

Tail: Application Pool Starting and Stopping? or Application Pools stops after restart? Make sure your application pool account has "Log on as batch job" rights!. This error may occur when necessary services like World Wide Web Publishing service, SharePoint Timer Service is in stopped state.

HTTP Error 401 - Not Authorised - in SharePoint site with Kerberos Authentication Enabled

In a new SharePoint web application, it prompted for user name and password repeatedly
and finally resulted in "Not Authorised - HTTP Error 401" - in the SharePoint site with Kerberos Authentication Enabled.

Here is some more spec: MOSS 2007, Windows 2008, IIS 7.5.

The Problem is: with IIS 7.5, kerberos enabled for SharePoint, we must turn OFF the "Kernel Mode Authentication". Here is how:

1. Open the IIS, Select the authentication feature of the appropriate web application

2. Select the authentication mode which is enabled, click on Advanced settings

3. Make sure you have unselected the "Kernel Mode Authentication"



4. Do the IISReset


SharePoint 2010 Search Error: "Internal server error exception"


Configured SharePoint 2010 Search in a new environment. When trying to search, received: Internal server error exception:" Error! Here are some workarounds:
internal server error exception sharepoint 2010 Search
  • Restart the SharePoint timer services/ IIS/ SharePoint Search service / Restart Server
  • Enable "Search Server WebParts" feature on the Site Collection level.
  • Run the "Search and Process" Timer Job
  • Make sure your search service application is associated with right proxy! (Go to Application Management >> Select Configure service application associations under the Service Application heading >>Select the default Application, select Your sevice app, Then click on set as default)
  • ensure that the "SharePoint Server Search" and "Search Query and Site Settings Service" services are running
  • Verify your AAM Settings
  • ensuring that the application pool is assigned correctly
  • Remove and reinstall the search application

Server error: http://go.microsoft.com/fwlink?LinkID=96177

SharePoint Central Administration displayed just "Server error: http://go.microsoft.com/fwlink?LinkID=96177" error message on a SharePoint Farm.
Server error: http://go.microsoft.com/fwlink?LinkID=96177

After little research, Found Hot fixes are installed, but Products and Technologies wizard has not Run! After running "SharePoint Products and Technologies Configuration Wizard" everything turned up.

In case psconfig fails, try: stsadm –o upgrade –inplace -url <URL-Of-the-Web-app> -forceupgrade

If you still get issues after upgrade, You can follow the Microsoft KB: http://support.microsoft.com/kb/944267


404 Page Not Found Error After migrating from MOSS 2007 to SharePoint 2010

After migrating from MOSS 2007 to SharePoint 2010, All the Sub-sites scolded me with: 404 Page Not Found error! But still able to get into the inner pages/document/site settings.

Common causes for HTTP 404 Not Found issue:
  • Verify the Host header in IIS and make sure its valid.
  • Managed Path which were present in old environment may not be there in New Environment.
  • Alternate access mapping - Make sure you have the Alternate access mapping set correctly and you are accessing using the right alternate access mapping, access your site with FQDN. If you are accessing the site using IP address, then update your DNS Entry/HOST file
But in this case, all above things were set to right. Looked at the event viewer, Logs files but could not figure out the cause of this problem.


    Verified Welcome page settings, Confirmed that the Default.aspx exists in the site by Opening site in SharePoint Designer.
    After scratching the head and with little trial and error figured out the solution: Check-out "Default.aspx" file and check-in back!!!

    Wrote a Powershell script to do Check-out and Check-in. In my case, I wanted to apply this fix for all sub-sites, So the code goes like:

    $SPsite = Get-SPSite <SITE-COLLECTION-URL>
    foreach ($SPweb in $SPsite.AllWebs)

    {
    $SPFile = $SPWeb.GetFile("default.aspx");
    $SPFile.CheckOut("Online",$null);
    $SPFile.CheckIn(1);
    $SPweb.Dispose()
    }
    $SPsite.Dispose()





    Trying to use an SPWeb object that has been closed or disposed and is no longer valid

    This code is error
    Private void GetData()
    {
    using (SPWeb ospWeb = SPContext.Current.Web)
    {
    //code here
    }
    }

    Replace code here

    Private void GetData()
    {
    using(SPSite spSite=new SPSite(SPContext.Current.Web.Url))
    {
    using (SPWeb spWeb = spSite.OpenWeb())
    {
    //code here
    }
    }
    }

    Increate execution Timeout Issue for sharepoint 2007 and 2010


    Default timeout of SharePoint is 6 minutes (360 seconds)

    Solution:

    Find to path to open file web.config
    Sharepoint 2007
    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS
    Sharepoint 2010
    C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS
    Open file: web.config

    Sample Web.Config

    Sharepoint 2007: edit 360 (6 second) to 7 or 8 seconds …

    <system.web>
    <compilation batch="false" batchTimeout="600" maxBatchSize="10000" maxBatchGeneratedFileSize="10000" />
    <httpHandlers>
    <add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </httpHandlers>
    <customErrors mode="On" />
    <httpRuntime executionTimeout="360" />
    <globalization fileEncoding="utf-8" />
    </system.web>

    Sharepoint 2010: edit 360 (6 second) to 7 or 8 seconds …

    <system.web>
    <compilation batch="false" batchTimeout="600" maxBatchSize="10000" maxBatchGeneratedFileSize="10000" />
    <customErrors mode="On" />
    <httpRuntime executionTimeout="360" />
    <globalization fileEncoding="utf-8" />
    </system.web>

    If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator


    Step 1: After add web part, you click button Export …
    <!--[if !vml]--><!--[endif]-->
    Step 2: Appear error below
    <!--[if !vml]--><!--[endif]-->
    Step 3: Because permission of system, you can edit “trust level” in file web.config with path to port contain your web application (Ex: C:\inetpub\wwwroot\wss\VirtualDirectories\80)
    <!--[if !vml]--><!--[endif]-->
    Step 4: Find “trust level” and change “WSS_Minimal” to “Full” and save file.
    <!--[if !vml]--><!--[endif]-->

    Display Save Site As Template in sharepoint 2010


    Step 1: Open your site | Click Site Action | Site Setting
    <!--[if !vml]--><!--[endif]-->
    Step 2: You want to Save site as template, but you don’t see it in categories Site Action
    <!--[if !vml]--><!--[endif]-->
    Step 3: It is easy, click to Manage site features
    <!--[if !vml]--><!--[endif]-->
    Step 4: find feature Sharepoint Server Publishing and Deactive it
    <!--[if !vml]--><!--[endif]-->
    Step 5: Click Deactive this feature
    <!--[if !vml]--><!--[endif]-->
    Step 6: Now, you can see Save site as template link
    <!--[if !vml]--><!--[endif]-->

    The list cannot be displayed in Datasheet view


    Error 1
    Or Error 2
    <!--[if !vml]--><!--[endif]-->
    Solution: download component at here and setup it
    Choose your list and click tab List then click Ribbon Button “DataSheet View”
    <!--[if !vml]--><!--[endif]-->
    Result as


    When deploy webpart, you see error follow as:
    <!--[if !vml]--><!--[endif]-->

    Solution:
    Open central admin | Application management | click to Change site collection administrators
    <!--[if !vml]--><!--[endif]-->

    You see administrator is quochung and admin, but current have not user quochung, administrator is available, so can change any user to administrator
    <!--[if !vml]--><!--[endif]-->

    Change admin to administrator for site collection administrator.
    <!--[if !supportLineBreakNewLine]-->
    <!--[endif]-->
    <!--[if !vml]--><!--[endif]-->




    No comments:

    Post a Comment