现在的位置: 首页 > 综合 > 正文

FW: Exception from HRESULT: 0×81070201 when create list in MOSS

2013年03月06日 ⁄ 综合 ⁄ 共 1662字 ⁄ 字号 评论关闭

I'm creating a custom list template as a feature. The problem is that SharePoint can't seem to find my schema.xml for the list. In all examples I have found, the schema.xml file is always placed in a folder directly below the feature folder, with a name identical to the name of the list (as specified in the ListTemplate element). That won't work for me, however. The schema.xml for my list can be found at [featurename]\ListTemplates\[listname]\schema.xml. I have several list templates in my feature and want to organize them in a ListTemplate folder in my feature directory. But that means that SharePoint can't find the files, it seems. Everything works if I place the folder containing my list template schema.xml directly in my feature folder, however. Is it possible to solve this problem? The SDK mentions a Path attribute in the ListTemplate element which can be used to specify an alternative path to the schema.xml, but doesn't really mention what the path should look like...

 The error I get looks like this, by the way:

 Problem:

Exception from HRESULT: 0x81070201   at Microsoft.SharePoint.Library.SPRequestInternalClass.CreateListFromFormPost(String bstrUrl, String& pbstrGuid, String& pbstrNextUrl)
   at Microsoft.SharePoint.Library.SPRequest.CreateListFromFormPost(String bstrUrl, String& pbstrGuid, String& pbstrNextUrl)

Solution:

In my case, I had to name the folder that contained Schema.xml with the same name I used for "Name" attribute in element manifest xml file.

set your Path attribute to be the folder paths containing the folder that has the list name and that contains schema.xml. Almost all of the feature element XML elements have context from the root of the Feature folder under the 12 hive. 

So if your list schema is situated like this: 

CoolestFeatureEver\ListTemplates\listone\schema.xml 

Your path attribute in your ListTemplate that is in the CoolestFeatureEver Feature is Path="ListTemplates".

抱歉!评论已关闭.