Clearing or removing a key&value from SPWeb.Properties (Tips&Tricks)

this quick trick can be use for removing a property correctly form SPWeb object.

string key="Identifier";
if (!web.Properties.ContainsKey(key))
{
return; //make a check is already exists.
}
web.AllProperties.Remove(key); //first clear from AllProperties.
web.Properties[key] = null; // remove property value
web.Update(); //update web object.
web.Properties.Update(); // update properties object.

See you in next tips…

getting serivce url of exchange server by Exchange Web Service (EWS) Api using AutoDiscoverURL

if you don’t know your exhcange service url you can use powershell for getting url information easyly.

[System.Reflection.Assembly]::LoadFile(“C:\Program Files\Microsoft\Exchange\Web Services\1.1\Microsoft.Exchange.WebServices.dll”);
$Service = new-object Microsoft.Exchange.WebServices.Data.ExchangeService $Service.AutoDiscoverUrl(“<EMAIL ADDRESS>”)
$Service.Url

Could we create a second User Profile Service Application ?

Yes you can but ,
If you have only one server in your farm you can use just one User Profile Service Application (UPA) in this server because the windows Service of User Profile Syncronization Service just configurable only one UPA. So if you have more than one sharepoint server in your farm for example 3 server;  you can create more than 3 UPA but you can only syncronize 3 of them.

For Another scenario, i assume that you have only one server and already provisioned one UPA and configured the syncronization connection. After adding second UPA as you know you can not able to add any Sycronization connection for Second UPA . But if you stop CA-> Services On Server -> User Profile Syncronization Service and restart it will prompt you to select UPA options mean you can change the relation for specific UPA . Still only one UPA can able to sync for one server.

Excel Service can not display workbooks in Sharepoint 2010

Hi Everybody,

I have recently faced for a strange issue about displaying excel workbooks on Sharepoint 2010 .
When i checked the uls logs we have multiple exceptions like.

Stack trace: onetutil.dll: (unresolved symbol, module offset=00000000000A1A7D)
at 0x000007FEEFD71A7D onetutil.dll: (unresolved symbol, module offset=00000000000A2C3D)
at 0x000007FEEFD72C3D owssvr.dll: (unresolved symbol, module offset=0000000000008FA2)
at 0x000007FEE9A58FA2 owssvr.dll: (unresolved symbol, module offset=0000000000048C74)
at 0x000007FEE9A98C74 mscorwks.dll: (unresolved symbol, module offset=00000000002BF6D7)
at 0x000007FEF365F6D7 Microsoft.SharePoint.Library.ni.dll: (unresolved symbol, module offset=00000000000EC86B)
at 0x000007FEEB45C86B Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001AB6942)
at 0x000007FEED476942 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001A7ADED)
at 0x000007FEED43ADED Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001A7CF66)
at 0x000007FEED43CF66 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001A7FA31)
at 0x000007FEED43FA31

An internal error occurred.
at Microsoft.Office.Excel.WebUI.ExcelWebRendererControl.InternalPreRender()
at Microsoft.Office.Excel.WebUI.Utils.ExecuteWebEventHandler(CoreWebEventHandler coreWebEventHandler, CoreWebEventHandler baseClassHandler, Object param, IMainControl mainControl)

Utils.ExecuteWebEventHandler: unexpected exception System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Office.Excel.WebUI.ExcelWebRendererControl.InternalPreRender()
at Microsoft.Office.Excel.WebUI.Utils.ExecuteWebEventHandler(CoreWebEventHandler coreWebEventHandler, CoreWebEventHandler baseClassHandler, Object param, IMainControl mainControl)

Watson bucket parameters: SharePoint Server 2010, ULSException14, 5f9be61a “excel services application”, 0e00178d “14.0.6029.0”, 13ed43ce “microsoft.office.excel.webui.internal”, 0e00178b “14.0.6027.0”, 4da5bd73 “wed apr 13 18:12:51 2011”, 000009ca “000009ca”, 000000e9 “000000e9”, 4a6d3421 “nullreferenceexception”, 62646b69 “bdki”
The file that i want to open have url like http://blog.bugrapostaci.com:80/_layouts/xlviewer.aspx?id=/Shared%20Documents/CaseTest.xsls
But  the important one is in logs   in this correlation that unrelated information log not the exceptions. This info is about :
“There is no Web named “/SiteDirectory/BlogContent/Lists/Categories/AllCategories.aspx”. in first i ignored it quickly. Than i realized that article:

Excel Calculation Service cannot display workbooks if no root site collection is created for a web application.
http://support.microsoft.com/kb/2596582

The sharepoint version which i was working on it is before Oct 2011 CU . The Solution is simple install at least Oct 2011 CU for fixing these errors.

How to delete the Default SSP in SharePoint 2007

There is no way to delete default SSP from Sharepoint Central Administration site via using this gui.
So stsadm command has help us for removing Default SSP

1) Open a command prompt
2)change your path to drive:\program files\common files\microsoft shared\web server extentions\12\BIN
3) Run fallowing command:
stsadm -o deletessp -title SharedServices1 -force

Have a nice Tips&Tricks