I'm trying to use Outlook Web Access Web part in SharePoint Server 2013. I have added the OWACalendarPart web part to Web part Gallery using following Methods.
1) Go to Web part Gallery.
2) On Web part Gallery page, Click Files-> New Document -> New in the ribbon.
3) On New web part page, look for Microsoft.SharePoint.Portal.WebControls.OWACalendarPart,
Select the web part and click on populate gallery.
Now, I navigate to the SharePoint page where i want to add web part, clicked on Add web part. UnderMiscellaneous Category, I see OWACalendarPart.
When I click add, the page always saying "An error occurred while attempting to add the item to the page."
I tried Several Times But Nothing helped.How to add this OWACalendarPart to the page?
UPDATE :
This is the error I get from Log.
An error occurred while attempting to add the gallery item [Miscellaneous] OWACalendarPart to the page.
The error was: System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidProgramException: Common Language Runtime detected an invalid program. at Microsoft.SharePoint.Portal.WebControls.OWAPartBase.get_OWAServerAddressRoot()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterOWACalendarPart.Write13_OWACalendarPart(String n, String ns, OWACalendarPart o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterOWACalendarPart.Write14_WebPart(Object o) --- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle) at Microsoft.SharePoint.WebPartPages.WebPart.WriteXmlAsBytes(XmlSerializer xmls)
at Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(SerializationMode mode, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags, SPSerializationBinderBase serializationBinder, BinaryWebPartSerializerWriter writer)
at Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(SerializationMode mode, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags, SPSerializationBinderBase serializationBinder)
at Microsoft.SharePoint.WebPartPages.SPWebPartManager.AddWebPartToStore(WebPart webPart, Int32 viewId, String viewGuid) at Microsoft.SharePoint.WebPartPages.SPWebPartManager.AddWebPartInternal(SPSupersetWebPart superset, Boolean throwIfLocked)
at Microsoft.SharePoint.WebPartPages.WebPartGallerySourceBase.AddItemToPage(WebPartZoneBase zone, Int32 zoneIndex, WebPart webPart)
at Microsoft.SharePoint.WebPartPages.WebPartGallerySourceBase.AddItemToPage(WebPartZoneBase zone, Int32 zoneIndex, WebPartGalleryItem item, String wpid) at Microsoft.SharePoint.WebPartPages.WebPartAdder.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)