Lambert 的个人资料Lambert Qin's technical ...照片日志列表更多 工具 帮助

日志


6月28日

fix errors 1088: “Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied” and 1334: “Exception: System.IO.FileLoadException”

Symptom:

Shared Services Administration Site cannot be opened.

and two errors logged in Event Viewer.

Event Type:    Error
Event Source:    ASP.NET 2.0.50727.0
Event Category:    None
Event ID:    1088
Description:
Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied

Event Type:    Error
Event Source:    ASP.NET 2.0.50727.0
Event Category:    None
Event ID:    1334
Description:
Failed to initialize the AppDomain:/LM/W3SVC/1937156701/Root

Exception: System.IO.FileLoadException

Message: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.

Troubleshooting:

Checked the ID in IIS, 1937156701 point to Shared Services Administration Site, it is OK.

But the error message “Could not load file or assembly…”, was totally misleading.

Did a ProcMon:

image

image

The Security seems normal with properly accounts and permissions.

image

However, the application pool account of Shared Services Administration Site (SSPAdminPool in this issue) was NOT in the WSS_WPG group!

Resolution:

Add application pool account of Shared Services Administration Site to WSS_WPG group.

 

Comments:

It is weird that I had installed MOSS 2007 dozens of times. It is first of time that the application pool account was not in the WSS_WPG group.

However, I am happy that this issue was resolved. :)

1月22日

Difference between View Only and Read permission level

View Only

Members of this group can view pages, list items, and documents. If the document has a server-side file handler available, they can only view the document by using that file handler.

  • Limited Access permissions

  • View Item

  • View Versions

  • Create Alerts

  • View Page

Read

Allows read-only access to the Web site.

  • View Only permissions

  • Open Item

see User permissions and permission levels (Office SharePoint Server) (http://technet.microsoft.com/en-us/library/cc721640.aspx) for more information.

As we can see the only difference between View Only and Read is *Open Item: View the source of documents by using server-side file handlers* which is very confused.

The server-side file handlers is hard to understand, the following words may be helpful.

Server Side File Handler
In several business activities the output is a file. The contents of this file is generated on the server, but has to be written to disk on the client side. We proposes a serializable class, that will have the same interface like a file on the server just without any writing to disk. Once on the client side it can be stored. It should be aligned with the file features of ASCII IO in Axapta today. Today most of the implementations requiring this feature are writing to the client file directly from the server. Causing a lot of C/S traffic and poor performance. This approach won't work for Green. (the server is stateless and cannot call the client).

the literally difference is the file will not be downloaded to their local computer if you have View Only permission only. While for users who have Read permission, they can open such the document locally.

In most case, there are no significantly different between them, because Office documents can be opened in server side.

1月13日

SharePoint SiteTemplate codes

If you used stsadm -o createsite or createweb operations, you would complain about the -sitetemplate parameter.

It actually took me lots of time to check the value in the 12Hive.

I am asked by a customer today, so I lists all shown templates in the UI.

The sitetemplate codes (actually site definition codes) are in the webtemp*.xml files located in %Program Files%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\[Lcid]\XML.

Site Templates shown in the SharePoint Server 2007 site creation UI:

Template Name

Code

Team Site

STS#0

Blank Site

STS#1

Document Workspace

STS#2

Wiki

WIKI#0

Blog

BLOG#0

Basic Meeting Workspace

MPS#0

Blank Meeting Workspace

MPS#1

Decision Meeting Workspace

MPS#2

Social Meeting Workspace

MPS#3

Multipage Meeting Workspace

MPS#4

Document Center

BDR#0

Records Center

OFFILE#1

Site Directory

SPSSITES#0

Report Center

SPSREPORTCENTER#0

Search Center with Tabs

SRCHCEN#0

My Site Host

SPSMSITEHOST#0

Search Center

SRCHCENTERLITE#0

Collaboration Portal

SPSPORTAL#0

Publishing Portal

CMSPUBLISHING#0

Server Admin Templates

   

Template Name

Code

Absence Request and Vacation Schedule Management

absence#0

Budgeting and Tracking Multiple Projects

projmulti#0

Bug Database

bt#0

Call Center

callcenter#0

Change Request Management

projchange#0

Compliance Process Support Site

comproc#0

Contacts Management

CM#0

Document Library and Review

DR#0

Event Planning

eventplan#0

Expense Reimbursement and Approval

exreports#0

Help Desk

helpdesk#0

Inventory Tracking

IT#0

IT Team Workspace

itteam#0

Job Requisition and Interview Management

JRIM#0

Knowledge Base

kb#0

Lending Library

ll#0

Physical Asset Tracking and Management

patm#0

Project Tracking Workspace

projsing#0

Room and Equipment Reservations

RER#0

Sales Lead Pipeline

ST#0

Site Admin Templates

If you add the template using the Addtemplate operation to the central template gallery, you must specify the template name as _GLOBAL_#number, where number refers to the template ID.

For more templates detailed information, please refer to the XML files located in %Program Files%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\[Lcid]\XML.

12月30日

How to fix workflow “Failed on Start” and "was canceled by System Account" error

Failed on Start usually means an error is happening in SharePoint before your workflow code spins up, such as not being able to find the workflow dll. (see Developing Workflows in VS: Part 6 - Deploy and Debug your workflow for more information)

Search for ULS log, I find the following error:

12/30/2008 19:11:47.88     w3wp.exe (0x11BC)                           0x1F24    Windows SharePoint Services       Workflow Infrastructure           75yn    Unexpected    Load Workflow Assembly: System.IO.FileNotFoundException: Could not load file or assembly '<Assembly Name>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. 

I can see the assembly in the GAC, But my real PublicKeyToken is 7a3c3335cb88783e, I just copy the PublicKeyToken of Microsoft.Office.Workflow.Feature! So SharePoint cannot find the correct dll.

Amend the PublicKeyToken, issue is resolved !

Pay attention to COPY(Ctrl+C) and PASTE(Ctrl+V), this is what I learned.

12月27日

How to resolve "The workflow template has specified no FormURN for this page" error if you do not use any forms for the workflow.

When creating a Workflow project, by default, I insert a workflow.xml snippet with something like this:
 
   1:  
   2: <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   3:   <Workflow
   4:        Name="My Workflow"
   5:        Description="This workflow ..."
   6:        Id="GUID"
   7:        CodeBesideClass="ProjectName.Workflow1"
   8:        CodeBesideAssembly="ProjectName, Version=1.0.0.0,
   9:          Culture=neutral,
  10:          PublicKeyToken=publicKeyToken"
  11:        TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
  12:        AssociationUrl="_layouts/CstWrkflIP.aspx"
  13:        InstantiationUrl="_layouts/IniWrkflIP.aspx"
  14:        ModificationUrl="_layouts/ModWrkflIP.aspx"
  15:        StatusUrl="_layouts/WrkStat.aspx">
  16:  
  17:     <Categories/>
  18:     <MetaData>
  19:       <AssociateOnActivation>false</AssociateOnActivation>
  20:     </MetaData>
  21:   </Workflow>
  22: </Elements>
  23:  

Usually I don’t have any forms associated with the workflow, after deploy the workflow, I will get the “The workflow template has specified no FormURN for this page.” error.

To resolve this, just remove the TaskListContentTypeId, AssociationUrl, InstantiationUrl, ModificationUrl properties of the workflow and redeploy the workflow. 

   1: <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   2:   <Workflow
   3:        Name="My Workflow"
   4:        Description="This workflow ..."
   5:        Id="GUID"
   6:        CodeBesideClass="ProjectName.Workflow1"
   7:        CodeBesideAssembly="ProjectName, Version=1.0.0.0,
   8:          Culture=neutral, 
   9:          PublicKeyToken=publicKeyToken"
  10:        TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
  11:        AssociationUrl="_layouts/CstWrkflIP.aspx"
  12:        InstantiationUrl="_layouts/IniWrkflIP.aspx"
  13:        ModificationUrl="_layouts/ModWrkflIP.aspx"
  14:        StatusUrl="_layouts/WrkStat.aspx">
  15:  
  16:     <Categories/>
  17:     <MetaData>
  18:       <AssociateOnActivation>false</AssociateOnActivation>
  19:     </MetaData>
  20:   </Workflow>
  21: </Elements>
12月20日

How do I configure incoming mail with Microsoft SharePoint Directory Management Service (DMS) enabled?

There have been a workaround that make the content web application pool use the same account as the central administration web application pool account.

In the August Cumulative Update, we fixed the permission issue related with DMS.

Now, the processes of configuring incoming mail with Microsoft SharePoint Directory Management Service (DMS) enabled are as follows:

1. Apply the August Cumulative Update or later update.

Visit Updates Resource Center for SharePoint Products and Technologies (http://technet.microsoft.com/en-us/office/sharepointserver/bb735839.aspx) to get latest updates.

2. Grant content application pool account with Design permission to Distribution Groups list in Central Administration > Operations > Approve/reject distribution groups.

3. Install Exchange Server 2003 / 2007.

If you do not want to install Exchange Server 2003 / 2007, you need to extend the AD schema by the following command at least.

l For exchange 2003, run setup /PrepareForest from the exchange 2003 installation disk.

l For exchange 2007, run setup /PrepareSchema from the exchange 2007 installation disk.

4. Follow the step by step guidance to configure the incoming mail:

Configure incoming e-mail settings (Office SharePoint Server) (http://technet.microsoft.com/en-us/library/cc262947.aspx)

Questions about Windows Internal Database and SQL Server 2005 Express Edition

Windows Internal Database is shipped with WSS 3.0. It is a relational data store used by Windows components and services.

The Windows Internal Database is not listed in the Add or Remove Programs tool and is not removed when you remove Windows SharePoint Services 3.0 from the computer. If you want to remove it from the server, please refer to the commands in the KB 920277 (http://support.microsoft.com/kb/920277)

Because the Windows Internal Database installs to your system drive by default, the disk space of the system drive may run out at some time. You can refer to the article to move it other drives: Move Windows Internal Databases to a different drive (Windows SharePoint Services 3.0) (http://technet.microsoft.com/en-us/library/dd277864.aspx)

If you are not familiar with command line, you could download the Microsoft SQL Server Management Studio Express Service Pack 2 which is a free, easy-to-use graphical management tool for managing SQL Server 2005 Express Edition, and then perform GUI operations by connecting the Windows Internal Database using “\\.\pipe\mssql$microsoft##ssee\sql\query” as Server Name.

SQL Server 2005 Express Edition is a free desktop database engine and shipped with MOSS 2007. It is limited to store a maximum of 4 GB of data and work on single processor systems.

For guidance about moving Windows SharePoint Services 3.0 content databases from Windows Internal Database to an instance of Microsoft SQL Server 2005, please refer to:

Move content databases from Windows Internal Database to an instance of SQL Server (Windows SharePoint Services 3.0) (http://technet.microsoft.com/en-us/library/cc287738.aspx)

Move content databases from Windows Internal Database or SQL Server Express Edition to an instance of SQL Server (Office SharePoint Server 2007) (http://technet.microsoft.com/en-us/library/cc262018.aspx)

11月12日

The Overdue items bug in Budgeting Tracking Multiple Projects templates and its fix

Recently, I had a issue on the overdue tasks in the Budgeting Tracking Multiple Projects templates.

Look at the scenario, there was no overdue task in the Overdue Items list, however we really saw it in the Dashboard.

image

image

 

I examined the filters / XSL in the list / web part.

The configuration was correct in the Overdue Items list as expected.

image

But the code in the Overdue Tasks web part was not so lucky.

(substring-before(@DueDate,'-') &lt; substring-before(ddwrt:TodayIso(),'-')
or
substring(@DueDate,6,2) &lt; substring(ddwrt:TodayIso(),6,2)
or
substring(@DueDate,9,2) &lt; substring(ddwrt:TodayIso(),9,2))]) &lt; 5">

The logic divide the DateTime (e.g.: “2008-11-12T12:00:000”) into Year (“2008”), Month (“11”) and Day (“12”)

and then compare with today’s Year, Month and Day separately.

That means either condition is true, the task is overdue.

A simple example, the condition will misunderstand the “2009-11-11” as a overdue date. A big mistake by MSFT.

I read some materials, but I didn't find a method to compare date in the XSLT directly.

I figure out a workaround: Convert the dates to number and then compare them.

number(substring(translate(@DueDate,'-',''),1,8)) &lt; number(substring(translate(ddwrt:TodayIso(),'-',''),1,8))

I am not sure whether it is a best fix or not, because I only have limited knowledge on XSLT and limited time to do testing.

10月28日

Fixed: Email enabled list requires admin rights on SharePoint server when using DMS

I have seen many customer complaint about only way to make  the E-Mail Distribution List and E-Mail enabled list work was to add the local farm admin and application pool accounts to the local Administrator group on the farm servers.

This puts us in violation of the least privilege security best practices provided by Microsoft, and puts our farm in unknown risk.

You may get the following errors from the the issue:

1. Access Denied

2. Error 5214 and The EXECUTE permission was denied on the object 'proc_putPendingDistributionList'

Event Type:    Error
Event Source:    Windows SharePoint Services 3
Event Category:    Database
Event ID:    5214
Date:        10/24/2008
Time:        6:41:05 PM
User:        N/A
Computer:    150870M5
Description:
Insufficient SQL database permissions for user '' in database '<configuration database>' on SQL Server instance '<Database backend server>'. Additional error information from SQL Server is included below.

The EXECUTE permission was denied on the object 'proc_putPendingDistributionList', database “<configuration database>”, schema 'dbo'.

 

Even if you have follow the official steps and do some troubleshooting (list below), the DMS and E-Mail enabled lists cannot work properly.

In the recently August Cumulative Update for Office SharePoint Server 2007 and Windows SharePoint Services 3.0, the issue is fixed finally.

Here is the issue description in the KB 956057:

If you want to communicate with the Directory Management service to enable incoming e-mail messages, you must add the local farm administrator account and the Application Pool account to the local Administrators group. However, this increases the risk that something unknown might occur in the farm.

If you have came across this issue, please apply the August Cumulative Update ASAP.

If you do not have, you could choose to wait for SP2 in the next year, the hotfixs will be included in SP2 too.

10月24日

How to Fix “Unable to get the private bytes memory limit for the W3WP process” error

==== Error Log ====

Event Type:    Error
Event Source:    ASP.NET 2.0.50727.0
Event Category:    None
Event ID:    1093
Date:        10/24/2008
Time:        12:29:54 PM
User:        N/A
Computer:    150870M5
Description:
Unable to get the private bytes memory limit for the W3WP process. The ASP.NET cache will be unable to limit its memory use, which may lead to a process restart. Error: 0x80070005

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

===============

==== SUMMARY of TROUBLESHOOTING ====

This error is caused by a known issue with insufficient permissions in your IIS metabase. The metabase ACL's on the target server did not include the IIS_WPG group on the following two nodes of the metabase (IIS_WPG is in both ACL's on a clean install):
- W3SVC/AppPools
- W3SVC/Filters

You can download the MetaACL utility from http://support.microsoft.com/?id=267904. After you have installed the program, open a command prompt and navigate to the directory where you installed it. Then type the following:

- cscript metaacl.vbs IIS://Localhost/W3SVC/AppPools IIS_WPG RE
- cscript metaacl.vbs IIS://Localhost/W3SVC/Filters IIS_WPG RE

Warning: 
The path is case sensitive - type exactly as above; after you run this command restart the IIS services and see if this corrects the problem.

==============================

original link: http://blogs.msdn.com/carloc/archive/2006/09/20/unable-to-get-the-private-bytes-memory-limit-for-w3wp-exe-process.aspx

10月21日

Something should be noticed when setting Access Request by programming

We all know the Access Request feature is available at site and list level.

image

However, if you check the SPWeb Members (Microsoft.SharePoint) (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb_members.aspx), you will find the RequestAccessEnabled property is read only.

image

It seems that the product team only let us set the email address.

So if you want to disable the Access Request feature in the site, just set the RequestAccessEmail to Empty string.

web.RequestAccessEmail = String.Empty;

10月7日

RESOLUTION: “This form was customized not working with attachment"

If you customized the forms, you would lose the function to add attachment.

image

Now, we have a official RESOLUTION!

for more information, please refer to:

Error message when you try to attach a file in a custom form on the Web site in Windows SharePoint Services 3.0: “This form was customized not working with attachment" (http://support.microsoft.com/kb/953271)

10月3日

Manage your document templates centralized

Recently, I have been asked a weird problem when you want to centralized the document template.

Here is the original thread link: http://social.technet.microsoft.com/forums/en-US/sharepointadmin/thread/d3c867a7-6a95-43ea-bba3-57206eac25fa

Let us reproduce the issue first:

1. Create a document library "Template Library" in order to store templates.

2. Add a template "My Word Template.dotx" to the "Template Library".

3. add a new content type "My Word Content Type 01" and use the "My Word Template.dotx" via Enter the URL of an existing document template in Advanced Settings.

4. Create another document library.

5. Create a document based on "My Word Content Type 01".

6. Save the document back to the library.

7. The content type supposes to be "My Word Content Type 01", but it is shown as Document content type.

Reason:

Let us think about the process the document is created.

1. Request create a document based on "My Word Content Type 01" ("My Word Template.dotx")

2. The template of "My Word Content Type 01"  is located in another library, so read the  "My Word Template.dotx"

3. create based on "My Word Template.dotx".

But, if so, the a weird problem should not be existed.

It seems that in the step 2, SharePoint did not read the "My Word Template.dotx", but "create" the "My Word Template.dotx" based on Document content type.

Solution:

So, I give a solution based on cutting down the Document content type, just like when you add a new content type, you can choose Upload a new document template in Advanced Settings.

Here are the detailed steps:

1. Create a Template Library and enable Allow management of content types.

image

image

2. Delete the All of the content types.

 image

3. Upload your templates.

image

4. Create your own content type using the template file from the Template Library and add it to a document library.

image

5. you will see a new content type is in the New menu.

image

6. When you save a document, you can choose which Document Type is used.

image

if you forget to input the required meta information, Word will warn you and let you complete it in a Document Information Panel.

image

7. Now, all done!

image

known issues:

1. the uploaded documents in Template Library are changed to Folder content type.

image