Saturday, March 27, 2010

HRESULT: 0x81070201 Exception

HRESULT: 0x81070201 Exception
Okay okay, this is actually something very basic, but it happend now a couple of times to me. If you work on a Feature that defines a custom SharePoint List, you can run into the following Error while activating it (in this case during Site Provisioning by definitions in onet.xml):

The element 'MyList' of type 'ListInstance' for feature 'MyListFeature' (id: 794958c5-fede-4e1f-aa96-d9fcd087945e) threw an exception during activation: Exception from HRESULT: 0x81070201

The reason for this error is, that SharePoint can't find the related schema.xml file for the list to define. This can happen, if


You simply forgot to write an schema.xml file

or, what is more realistic, the Name Attribute in ListTemplate is not the same as the Folder Name you have the schema.xml File stored in.

The Name-value of the ListTemplate tag must match the name of the folder you have your schema.xml file stored in:


Name="MyListDefinition"
Category="Custom Lists"
DisplayName="MyList"
...

Thursday, March 25, 2010

Unable to load symbols

While working on a Sharpoint project suddenly i got the following error Unable to load symbols and break point was not being hit.

Reason: The GAC had an older version. Update it !!!

Wednesday, March 24, 2010

Unable to select / Import wepart

Check if the dll has class using reflector
Make sure the class is public
install in Gac
IIS reseet

Wednesday, March 17, 2010

Check if SPLIst exist

static bool ListExists(SPWeb web, string listName)
{
return web.Lists.Cast().Any(list => string.Equals(list.Title, listName));
}


static bool WebExists(SPSite site, string webName)
{
return site.AllWebs.Cast().Any(web => string.Equals(web.Name, webName));
}

http://whatsthesharepoint.com/2010/01/easy-check-if-an-spwebsplist-exist/

Monday, March 15, 2010

Silver Light Out of browser with sharepoint

Just emmbed the SharePoint page to the Application :)


www.blogger.com/post-create.g?blogID=746540970001167515

Wednesday, March 10, 2010

Unable to debug SilverLight Webpart in Sharepoint

Please ensure you have checked Enable Silver light webpart debugging

Steps

> RGT click SP project
> Properties
> Click SharePoint Tab
> Scroll Down
> Check the check box Enable Silver light webpart debugging

Error occurred in deployment step ‘Retract Solution’: The local SharePoint server is not accessible. Check that the server is running and connected to

Solution:User should have enouhg permission on Config and Content DB


On the computer running Microsoft SQL Server 2000, open SQL Server Enterprise Manager.
In the console tree, expand the Microsoft SQL Servers node.
Expand the SQL Server Group node.
Expand the node for the SQL Server instance that SharePoint Portal Server uses.
Expand the Security node.
Click Logins, and then do one of the following:
If the logon name for the account that you specified as the identity for the application pool does not exist, right-click Logins, click New Login, and then in the Name box, type the account for the user in the format DOMAIN\user_name.
If the logon name for the account that you specified as the identity for the application pool already exists, right-click the logon name in the details pane, and then click Properties.
In the properties dialog box, click the Database Access tab.
For the portal site _SITE database, _SERV database, _PROF database, and for the configuration database (by default, this is SPS01_Config_db), do the following:
In the Specify which databases can be accessed by this login section, select the Permit check box for the database.
In the Database roles for database_name section, select the db_owner check box.
Click OK.
Close SQL Server Enterprise Manager.

Error occurred in deployment step 'Retract Solution': Cannot start service SPUserCodeV4 on computer

Building Sandboxed Solutions on SharePoint 2010 using Visual Studio 2010 Beta and encountered the error? Then make sure that the service Microsoft SharePoint Foundation User Code Service ( CA > System Settings > Services on Server >Microsoft SharePoint Foundation Sandboxed Code Service ) is Started.