HTTPMaxCollectionKeys threshold limit reached
Getting error HTTPMaxCollectionKeys threshold limit reached when trying to configure a webpart.
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT face=Calibri>Reason of the issue:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></B></P> <P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT face=Calibri>When you edit Viewed Lists of the qListView by using ezEdit, it will show you all the SPLists of the site. Then you select one of the SPLists and click OK to save the configuration. The webform will post your request back to the server. Image that there are about 500 SPLists on this webform, each SPLists have 2 parameters. The web form itself also contains the other parameters. So there are more than 1000 parameters that need to be submitted to the web server. But IIS just allows 1000 parameters to be submitted in one webform by default. So you will see the error message threw by IIS to tell you that the MaxHttpCollectionKeys Exceeded. <o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT face=Calibri>Workaround:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></B></P> <P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT face=Calibri>There are two options, please choose one base on your situation.<o:p></o:p></FONT></P> <P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT face=Calibri>Option 1: Increase the value of MaxHttpCollectionKeys.<o:p></o:p></FONT></P> <P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst><SPAN style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri>1)</FONT><SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></SPAN></SPAN><FONT face=Calibri>Open the web.config of your IIS on the web server.<o:p></o:p></FONT></P> <P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle><SPAN style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri>2)</FONT><SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></SPAN></SPAN><FONT face=Calibri>Find <AppSettings>…</AppSettings> section.<o:p></o:p></FONT></P> <P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle><SPAN style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri>3)</FONT><SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></SPAN></SPAN><FONT face=Calibri>Add this section to change the value of MaxHttpCollectionKeys, for example increase the value to 2000:<o:p></o:p></FONT></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><SPAN style="COLOR: #0070c0"><FONT face=Calibri><add key="aspnet:MaxHttpCollectionKeys" value="2000" /><o:p></o:p></FONT></SPAN></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><SPAN style="mso-fareast-language: ZH-TW; mso-no-proof: yes"><?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x005F_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype></SPAN><o:p></o:p></P> <P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast><SPAN style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri>4)</FONT><SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></SPAN></SPAN><FONT face=Calibri>Save web.config.</FONT></P> <P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast><FONT face=Calibri>See ScreenShot01.png (web.config example)</FONT></P> <P style="MARGIN: 0in 0in 10pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></P> <P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT face=Calibri>Option 2: Directly use xml<SPAN style="mso-spacerun: yes"> </SPAN>to define Viewed Lists of qListView.<o:p></o:p></FONT></P> <P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class=MsoListParagraphCxSpFirst><SPAN style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri>1)</FONT><SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></SPAN></SPAN><FONT face=Calibri>Open ezEdit of qListView. In Display tab, do not click Edit button of Viewed Lists, but directly input xml to define which SPList you want to show in qListView. <o:p></o:p></FONT></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><FONT face=Calibri>The format is:<o:p></o:p></FONT></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><SPAN style="COLOR: #0070c0"><FONT face=Calibri><Lists><o:p></o:p></FONT></SPAN></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><SPAN style="COLOR: #0070c0"><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN><List SiteUrl="<site URL> " ListName="SPList 1" /><o:p></o:p></FONT></SPAN></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><SPAN style="COLOR: #0070c0"><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN><List SiteUrl="<site URL>" ListName="SPList 2" /><o:p></o:p></FONT></SPAN></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><SPAN style="COLOR: #0070c0"><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>…<o:p></o:p></FONT></SPAN></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><SPAN style="COLOR: #0070c0"><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN><List SiteUrl="<site URL>" ListName="SPList n" /><o:p></o:p></FONT></SPAN></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><SPAN style="COLOR: #0070c0"><FONT face=Calibri></Lists><o:p></o:p></FONT></SPAN></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><o:p><FONT face=Calibri> </FONT></o:p></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><FONT face=Calibri>For<SPAN style="mso-spacerun: yes"> </SPAN>example, use qListView to show two SPLists MyLibrary100 and MyLibrary102, the site url is “http://dev_server/test/”. See ScreenShot02.png (list example).</FONT></P> <P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><SPAN style="mso-fareast-language: ZH-TW; mso-no-proof: yes"></SPAN><o:p></o:p></P> <P style="MARGIN: 0in 0in 10pt 0.5in" class=MsoListParagraphCxSpLast><o:p><FONT face=Calibri> </FONT></o:p></P> <P style="MARGIN: 0in 0in 10pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT face=Calibri>Reason of the issue:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></B></P> <P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT face=Calibri>When you edit Viewed Lists of the qListView by using ezEdit, it will show you all the SPLists of the site. Then you select one of the SPLists and click OK to save the configuration. The webform will post your request back to the server. Image that there are about 500 SPLists on this webform, each SPLists have 2 parameters. The web form itself also contains the other parameters. So there are more than 1000 parameters that need to be submitted to the web server. But IIS just allows 1000 parameters to be submitted in one webform by default. So you will see the error message threw by IIS to tell you that the MaxHttpCollectionKeys Exceeded. <o:p></o:p></FONT></P>