InfoPath SharePoint FormServer error 5566


The Error code 5566 is very common, and if you get that error

“ An error occurred querying a data source.

Click OK to resume filling out the form. You may want to check your form data for errors.
 Hide error details
 System.Xml.XmlException: There are multiple root elements. Line 2, position 2 ……………………..  “

Code 5566 is a very common error when performing cross web services calls

The Problem is more of a server architecture issue ( on a single sever farm configuration you may not have those issues)

The Root causes

  1. Name resolution
  2. Certificate validation errors
  3. UAG or any Url Filter or traffic parsing engines (F5 Big-IP and the like.)

The cause can be one or all of the above.

Simply to understand the problem, you need to understand how InfoPath handles this type of traffic.

  1. Client ( C  ) requests a form operation from form server ( S )
  2. S read the template from the same server or the document library or storage .
  3. S builds a temp map in memory for the current user of the form rules and code for the duration of the session.
  4. S Execute the operation (read, update, or new) form.
  5. C render on InfoPath Client or Browser (thin client )
  6. S terminates session.

Where things break

At steps 1, 2, 3 and 4

Problem Solution
1 [1] C resolve the server as [IP x.y.z.w] but Sresolves as different IP and server encounter a template or form load error but does not report it to the user Try to browse the data connection urls from the server itself  and check if you encounter any problem , resolve accordingly(In some cases internal DNS record does not match the proper configuration  use hosts file entry to manually force the session to the same server)
2 [1] If you are behind a proxy or load balanced farm Try to configure it so that the server sessions are bound to a single server for the same client.
3 [1] If you are using a public name and internal name using AAM Make sure you are resolving the correct IP inside and outside the proxy/firewall see Item 1
4 [2] S can’t load the form or the template That should not cause 5566 but it will be more descriptive If you are using a proper proxy configuration , but in some cases where the proxy configuration is not correct this will show as error 5566
5 [3] If you have dynamic links for services that gets compiled at load You need to debug this by loading this form on the same server.
6 [3] If you are using SSL certs Make sure your server can validate the certificate or disable certificate validation.
7 [4] If read new or  update  operation Check the on load rules and see if those generate certain other web services or list connections that cause this issue and handle as in item 1 above

Best of Luck

Advertisements

SharePoint Issues post service pack /Cumulative updates or if you add or remove a member to the SharePoint Farm


SharePoint Issues post service pack /Cumulative updates or if you add or remove a member to the SharePoint Farm

I have had those in the SharePoint 2007 years but didn’t expect that with SharePoint 2010 the DEC 2011 cumulative update.

But here is a way to fix it

(run from the command prompt at the 14\bin\ as an administrator) or better, run the SP management PowerShell console as administrator and run the following command)

Note: the command is harmless but the farm might not be accessible during execution.

It performs a forced upgrade and that should clear all errors on Central Administration or any others encountered during the configuration wizard upgrade.

psconfig -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures



This phase may take a while (depending on how large it your databases)



Make sure you are able to get to Central administration after this task completes

This has been a life saver in many cases

Best of luck

Using Multiple ASP SQL Role providers on multiple SharePoint Sites.


I found this problem as I was extending a SharePoint site to use FBA and the client wanted the users of Site 2 in a different database  than that of  Site 1.

Here are some concepts first

You have multiple FBA profile providers , Membership Provider , and Role Provider.

You need to have the following per site

Site1

  • Site1MembershipProvider
  • Site1RoleProvider
  • Site1ProfileProvider

Site2

  • Site1MembershipProvider
  • Site1RoleProvider
  • Site1ProfileProvider

Etc,…

All in one web.Config file / application

While that is obviously not doable without custom provider , yet , you will still have the challenge of dynamically switching the provider at runtime.

Here is the fix no coding needed.

ProfileCommon class only points to the properties under the  Default provider

Yet, you can trick it with the following.

<profile enabled=”true” defaultProvider=”SQLProfile”>

<!–  The “name” attribute of each property entry corresponds, that is the ProfileCommon properties–>

<properties>

<add name=”FirstName” />

<add name=”MiddleName” />

<add name=”LastName” />

<!– Required Sharepoint properties follow… –>

<add name=”PreferredName” defaultValue=”NA” />

<add name=”WorkEmail” defaultValue=”unknown@NA.com” />

<add name=”WorkPhone” type=”System.String” defaultValue=”NA” />

<!– Required for the Custom Profile Site1 –>

<add name=”Site1FirstName”  type=”string” provider =”FBASite1Profile”/>

<add name=”Site1MiddleName” type=”string” provider =”FBASite1Profile”/>

<add name=”Site1LastName”   type=”string” provider =”FBASite1Profile”/>

</properties>

<providers>

<add name=”SQLProfile” type=”System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” connectionStringName=”AspNetSqlProvider” applicationName=”/” />

<add name=”FBASite1Profile” type=”System.Web.Profile.SqlProfileProvider” connectionStringName=”FBASite1ConnectionString” applicationName=”Site1Application” />

</providers>

<add name=”FBASite2Profile” type=”System.Web.Profile.SqlProfileProvider” connectionStringName=”FBASite2ConnectionString” applicationName=”Site2Application” />

</providers>

<add name=”FBASite3Profile” type=”System.Web.Profile.SqlProfileProvider” connectionStringName=”FBASite3ConnectionString” applicationName=”Site3Application” />

</providers>

</profile>

Accessing the profile through code

Creating a profile

MembershipUser  newUser = Membership.Providers[“Site1Membership”].CreateUser(UsernameTextbox.Text, PasswordTextbox.Text,EmailTextbox.Text, passwordQuestion,passwordAnswer, chkActive.Checked,(object)Guid.NewGuid(), out status);

ProfileCommon pc = (ProfileCommon)ProfileBase.Create(newUser.UserName);

pc.SetPropertyValue(“Site1FirstName”, FirstName.Text);

pc.SetPropertyValue(“Site1MiddleName”, MiddleName.Text);

pc.SetPropertyValue(“Site1LastName”, LastName.Text);

pc.Save();

Reading a profile

MembershipUser user = Membership.Providers[“Site1Membership”].GetUser(username,false);

ProfileCommon pc = (ProfileCommon)ProfileBase.Create(user.UserName);

FirstName.Text = pc.GetPropertyValue(“Site1FirstName”).ToString() ;

MiddleName.Text= pc.GetPropertyValue(“Site1MiddleName”).ToString();

LastName.Text = pc.GetPropertyValue(“Site1LastName”).ToString();

Good Luck .

Generating Unique IDs in Windows SharePoint Services 3.0


My Solution is here

Con s
The major problem with this technique is concurrency .
2 or more users with fast machines and network connections ( or many queued docuemnts) can cause this to deadlock.

Pro s
Easy to do , easy to deply and staple the feature to the site if you want and makes your life easy , as it is an event handler for on the onCreate or onNew.

Final Solution
I have been in this situation a few times, and here is the final working solution.

Why reinvent the wheel when SharePoint already has a Sequence generator that is Thread safe it is called (SharePoint List )

Simply on every Item you need a a new ID , create an Item in the new List , get the ID and give it to your Document List , announcent , or whatever Items you want Unique ID for.

Code is simple but not public.

Thanks and good luck


http://msdn.microsoft.com/en-us/library/cc303696(office.12).aspx#CommunityContent

Infopath Workflow The form has been closed. form cannot be found


Error

 

Page error

The form has been closed.

 

Error Log

Exception occurred during request processing. (User: XXX\Jackson, Form Name: , IP: , Request: http://portalsites-test2/_layouts/IniWrkflIP.aspx?List=3f3aea57-9808-4d6f-8ae8-658677abc7d4&ID=2&TemplateID={79cf7b35-6830-4c20-885a-eb8f519bc298}&Source=http://portalsites-test2/sites/it-appdev/TestSite/DocumentTest/Forms/AllItems.aspx, Form ID: , Type: InfoPathLocalizedException, Exception Message: The specified form cannot be found.)

My fix :

http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/980eef0a-80a3-4f6e-94dd-6f2b3902dd5e/#d77c96c7-a99b-4f8d-a6c4-ac86e53c664d