ĐÀ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.

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.

Feature 1: Trouble with large list


Step 1: Open your site | Click Site Actions | View All Site Content
Step 2: Choose your list and click to it
Step 3: Click to tab List | choose List Setting
Step 4: You see: If number record of list display on View is 3300, Warning this number approach to 5000. If number item is over 5000 on list view, what is happen? => you can’t Filter, group, … So List can contain 50.000.000 items and view can contain over 5000 items to 50.000.000 similar List but you can’t manipulate on view. Moreover, you can’t save as template or save sub site .

Feature 2: How to solve trouble with large list


In this article, you will know how to work with large list

Step 1: Open your web application and login with normal user | choose your list with number item > 5000 Items, you see message below
Step 2: Click tab list | List Settings
Step 3: Warning when number item over 5000 items
Step 4: Login with administrator and click your list, you see sharepoint  view  is normal
Step 5: Click Site Settings | Save site as template, you can choose checkbox Include content and can Filter when data only 5069
Step 6: Similar login with normal user, click Site Settings | Save site as template, you can’t choose checkbox Include content and can Filter when data only 5069
Step 7: Go to Central admin | Application Management
Step 8: In categories Web Application | click “Manage web applications”
Step 9: Choose  your Web App
Step 10: Click General Settings | Resource Throttling
Step 11: you see default below
Step 12: Change number in TextBox
Step 13: Login again with normal user
Step 14: Result, Sharepoint View is normal
Step 15: You will see warning but normal can Save site as template, Filter …
Step 16: Result, normal user can check to checkbox “Include Content”

Feature 3: Inline Editing on sharepoint 2010


Step 1: Open Your Web Application | On your list, choose view and modify your view
Step 2: in Inline Editing, check to Allow inline editing
Step 3: Result as, continue click to Icon edit below
Step 4: Edit content
Step 5: Result as