Hi everybody,
After a SharePoint 2010 domain migration, we had an error when creating or reading an Infopath form. The error said "An error occured while trying to connect to a Web Service". We had this error in the ULS logs :
Data adapter failed during OnLoad: The remote server returned an error: (500) Internal Server Error. Server was unable to process request. ---> Specified argument was out of the range of valid values. The following query failed: GetUserProfileByName (User: 0#.w|DOMAIN\USER, Form Name: Template012345, IP: , Connection Target: , Request: http://link_to_my_site/AllItems.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:Template012345:-dataFormSolution Type: DataAdapterException, Exception Message: The remote server returned an error: (500) Internal Server Error. Server was unable to process request. ---> Specified argument was out of the range of valid values. Parameter name: lcid The remote server returned an error: (500) Internal Server Error.)
In this environment, SharePoint sites were accessible in French and in English. We only had this error for English users. To resolve this issue, we simply add the English language to the Working Language setting of the Managed Metadata Service Application.