Overview & Problem:
I came across an annoying issue recently in infopath web enabled forms in SharePoint 2010. My infopath form had code behind where I was dumping data in SQL server and SharePoint list upon submit of the form. The problem did not occurred in preview mode of info path also. My application was running fine on my development environment on VM, but it was causing following error on submit action on the production server.
Event Type: Warning
Event Source: Office SharePoint Server
Event Category: Forms Services Runtime - Business Logic
Event ID: 5337
Date: 2009-07-09
Time: 14:37:09
User: N/A
Computer: SERVERNAME
Description:Business logic failed due to an exception.User: DOMAIN\username,
Form Name: FormName,
IP: ,
Request: http://address.domain.com/_layouts/FormServer.aspx?XsnLocation=http://address.domain.com/FormServerTemplates/FormName.xsn&SaveLocation=http://address.domain.com/FormLibrary&Source=http://address.domain.com/FormLibrary/Forms/AllItems.aspx&DefaultItemOpen=1,
Form ID: urn:schemas-microsoft-com:office:infopath:FormName:-myXSD-2009-05-13T13-53-20,
Type: WebException,
Exception Message: Security Restrictions on the server are preventing the data connection being used. (translated from Swedish so this might not be 100% accurate to the standard MS error)
Cause:
After a long investigation, I came to know that my code behind of info path had the issue in the area where I was adding item in the share point list. Although no exception was thrown and the data was added successfully in the list, but that part of my code behind was cul-prate of the problem. I was usinf SharepointListRwQueryConnection for list manipulation code that caused warning message in infopath upon submit.
Solution:
I simply used another way of accessing list in code behind using following code.
ClientContext clientContext = new ClientContext("http://sp2010Server/sites/mySite");SP.List oList = clientContext.Web.Lists.GetByTitle("Site Requests");
This code for accessing SharePoint list was faster and solved that annoying warning message upon infopath submit.
I came across an annoying issue recently in infopath web enabled forms in SharePoint 2010. My infopath form had code behind where I was dumping data in SQL server and SharePoint list upon submit of the form. The problem did not occurred in preview mode of info path also. My application was running fine on my development environment on VM, but it was causing following error on submit action on the production server.
Event Type: Warning
Event Source: Office SharePoint Server
Event Category: Forms Services Runtime - Business Logic
Event ID: 5337
Date: 2009-07-09
Time: 14:37:09
User: N/A
Computer: SERVERNAME
Description:Business logic failed due to an exception.User: DOMAIN\username,
Form Name: FormName,
IP: ,
Request: http://address.domain.com/_layouts/FormServer.aspx?XsnLocation=http://address.domain.com/FormServerTemplates/FormName.xsn&SaveLocation=http://address.domain.com/FormLibrary&Source=http://address.domain.com/FormLibrary/Forms/AllItems.aspx&DefaultItemOpen=1,
Form ID: urn:schemas-microsoft-com:office:infopath:FormName:-myXSD-2009-05-13T13-53-20,
Type: WebException,
Exception Message: Security Restrictions on the server are preventing the data connection being used. (translated from Swedish so this might not be 100% accurate to the standard MS error)
Cause:
After a long investigation, I came to know that my code behind of info path had the issue in the area where I was adding item in the share point list. Although no exception was thrown and the data was added successfully in the list, but that part of my code behind was cul-prate of the problem. I was usinf SharepointListRwQueryConnection for list manipulation code that caused warning message in infopath upon submit.
Solution:
I simply used another way of accessing list in code behind using following code.
ClientContext clientContext = new ClientContext("http://sp2010Server/sites/mySite");SP.List oList = clientContext.Web.Lists.GetByTitle("Site Requests");
This code for accessing SharePoint list was faster and solved that annoying warning message upon infopath submit.
No comments:
Post a Comment