When I am trying to access the web serice method in the VSTA code of Infopath form, I was getting the following error message:
The error message is “There is an error in XML document (1, 302)."
The stack trace is “ at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at EmpSepChkLst.AD_SEARCH.NDAWebService.SerachUserInDomain(String UserName)
at EmpSepChkLst.CommonFunctions.GetUserInfo(String CurrentUserId)”.
The solution for this is:
You need to publish the infopath form with full permission( Tools -> Form Options -> Security and Trust -> Select Full trust). I was publishing with "Domain" permissions and it was throwing the error while opening the infopath form from Sharepoint Document Library.
No comments:
Post a Comment