ĐÀO TẠO DOANH NGHIỆP : SỞ KHOA HỌC CÔNG NGHỆ TỈNH ĐỒNG NAI

ENTERPRISE TRAINING: DONG NAI DEPARTMENT OF SCIENCE AND TECHNOLOGY.

HÌNH ẢNH TẬP HUẤN LỚP SHAREPOINT WORKFLOW VÀ KIẾN TRÚC SHAREPOINT

PHOTOS OF SHAREPOINT WORKFLOW AND ARCHITECTURE CLASS.

HÌNH ẢNH TẬP HUẤN LỚP SHAREPOINT WORKFLOW VÀ KIẾN TRÚC SHAREPOINT

PHOTOS OF SHAREPOINT WORKFLOW AND ARCHITECTURE CLASS.

Showing posts with label Resolve Trouble Sharepoint. Show all posts
Showing posts with label Resolve Trouble Sharepoint. Show all posts

Sunday, March 4, 2012

Trouble 1: 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
            }
    }
}

Trouble 2: 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>

Trouble 3: 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 …
Step 2: Appear error below
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)
Step 4: Find “trust level” and change “WSS_Minimal” to “Full” and save file.

Trouble 4: Display Save Site As Template in sharepoint 2010


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

Trouble 5: The list cannot be displayed in Datasheet view


Error 1
Or Error 2
Solution: download component at here and setup it
Choose your list and click tab List then click Ribbon Button “DataSheet View”
Result as

Trouble 6: Error occurred in deployment step ‘Recycle IIS Application Pool’


When deploy webpart, you see error follow as:
Solution:
Open central admin | Application management | click to Change site collection administrators
You see administrator is quochung and admin, but current have not user quochung, administrator is available, so can change any user to administrator
Change admin to administrator for site collection administrator.