In Mathematics, dividing a number by zero is undefined. We can check first if the divisor is zero and return zero as the result.
The SharePoint Playbook
Monday, September 30, 2013
Attempted to divide by zero
When exporting the Telerik RadGrid to Excel, the "Attempted to divide by zero" exception is thrown. The grid contains calculated columns such as getting the percentage, etc.
String.Format("{0:0.00%}", group.Sum(i => i.myDivisor) == 0 ? 0 : group.Sum(i => i.myDividend) / group.Sum(i => i.myDivisor) ),
CS0012: The type is defined in an assembly that is not referenced
After deployment, page layouts are throwing Compiler Error Message: CS0012: The type 'MCS.FW.SharePoint.UI.WebControlHTMLBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'MCS.FW.SharePoint, Version=2.0.0.0, Culture=neutral, PublicKeyToken=561ca36a4ea2b5b4'
The error can be fixed by adding the reference in the <assemblies> tag in web.config.
The error can be fixed by adding the reference in the <assemblies> tag in web.config.
Wednesday, September 25, 2013
The form cannot be displayed because session state is not available.
When configuring the out-of-the-box SharePoint workflow on a site, the following error message is displayed in the _layouts/AddWrkfl.aspx.
This is because the Shared Service Provider(SSP) has not been configured. To fix the error, you can try any of the steps below.
1. Open the web.config file for the site, search for the word "SessionStateModule" and uncomment that line. Note that this is only a workaround.
<!–- <add name="Session" type="System.Web.SessionState.SessionStateModule"> -–>
should be:
<add name="Session" type="System.Web.SessionState.SessionStateModule"></add>
2. Create a new SSP and associate it to the web application.
Hope this helps! :)
This is because the Shared Service Provider(SSP) has not been configured. To fix the error, you can try any of the steps below.
1. Open the web.config file for the site, search for the word "SessionStateModule" and uncomment that line. Note that this is only a workaround.
<!–- <add name="Session" type="System.Web.SessionState.SessionStateModule"> -–>
should be:
<add name="Session" type="System.Web.SessionState.SessionStateModule"></add>
2. Create a new SSP and associate it to the web application.
Hope this helps! :)
Subscribe to:
Posts (Atom)