Wednesday, October 20, 2010

Sharepoint Trivia -- 3

############
Error ::
~~~~~~~~~~~~
Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service
############

############
Resolution ::
~~~~~~~~~~~
Make the iis directory anonymous.
That's it.
############

Tuesday, October 19, 2010

Sharepoint Trivia -- 2

This post contains information about creating custom navigation menu for the sharepoint site.
(Sorry for the bad quality of images)

1. Create a custom sitemap file. Save it as mycustom.sitemap.


2. Save this file in the location : C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\mycustom.sitemap.
3. Add a sitemap provider to the web.config.


4. Add a sitemap data source to master page.
a. Open Sharepoint designer and open the master page of the site.
b. Look out for line <>
asp:SiteMapDataSource ShowStartingNode="True" runat="server"
ID="MyCustomSiteMap" SiteMapProvider="MyCustomSiteMapProvider" />

5. Modify the data source for Sharepoint menu.
a. In sharepoint designer, look out for line <>
DataSourceID = "MyCustomSiteMapProvider"
b. Save the master page and see the change.

Monday, October 18, 2010

Sharepoint Trivia -- 1

Since I have been working on Microsoft Sharepoint for quite a long time now.
So thought of writing my blog about my experience with it.

The post under this header will contain the errors I faced and how I resolved them.
As there wasn't enough information given on internet so had to go through the documentation
several times and than can to know, that just one small thing was missing.
So thought of saving others from the pain of this.

##############
Error ::
~~~~~~~~~~~~~~~
"Microsoft.SharePoint.SPException: The security validation for this page is invalid."
###############


##############
Resolution ::
~~~~~~~~~~~~~~~
To be able to call into the SharePoint object model directly from an InfoPath browser form and perform updates, you must set SPWeb.AllowUnsafeUpdates to true.
The MSDN documentation on SPWeb.AllowUnsafeUpdates says:
The SPWeb.AllowUnsafeUpdates property gets or sets a Boolean value that specifies whether to allow updates to the database as a result of a GET request without requiring a security validation.
The documentation further states the implication of setting SPWeb.AllowUnsafeUpdates to true. Setting this property to true opens security risks, potentially introducing cross-site scripting vulnerabilities. So ensure you set SPWeb.AllowUnsafeUpdates to false immediately after running the code that calls into the SharePoint object model.
##############