<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>error message &#8211; Kodono</title>
	<atom:link href="https://blog.kodono.info/wordpress/tag/error-message/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.kodono.info/wordpress</link>
	<description>Pour tous les technophiles</description>
	<lastBuildDate>Fri, 23 Dec 2011 11:14:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>
	<item>
		<title>Si vous avez l&#8217;erreur &#8220;The security validation for this page is invalid&#8221; [Sharepoint]</title>
		<link>https://blog.kodono.info/wordpress/2011/12/23/si-vous-avez-lerreur-the-security-validation-for-this-page-is-invalid-sharepoint/</link>
					<comments>https://blog.kodono.info/wordpress/2011/12/23/si-vous-avez-lerreur-the-security-validation-for-this-page-is-invalid-sharepoint/#respond</comments>
		
		<dc:creator><![CDATA[Aymeric]]></dc:creator>
		<pubDate>Fri, 23 Dec 2011 11:14:34 +0000</pubDate>
				<category><![CDATA[Niveau intermédiaire]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[Astuce]]></category>
		<category><![CDATA[error message]]></category>
		<category><![CDATA[sharepoint]]></category>
		<guid isPermaLink="false">http://blog.kodono.info/wordpress/?p=818</guid>

					<description><![CDATA[&#8220;The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.&#8221; Si Sharepoint vous donne ce joli message d&#8217;erreur lorsque vous communiquez avec un de ses web services, alors il est possible que vous ayez oublié d&#8217;ajouter un header &#8220;SOAPAction&#8221; avec le nom du [&#8230;]]]></description>
										<content:encoded><![CDATA[<blockquote><p>&#8220;The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.&#8221;</p></blockquote>
<p>Si Sharepoint vous donne ce joli message d&#8217;erreur lorsque vous communiquez avec un de ses web services, alors il est possible que vous ayez oublié d&#8217;ajouter un <em>header</em> &#8220;SOAPAction&#8221; avec le nom du service associé.</p>
<p>Prenons l&#8217;exemple du web service <em>lists.asmx</em> et de l&#8217;action &#8220;UpdateListItems&#8221;. Si vous allez sur l&#8217;URL suivante <a href="http://votre_sharepoint/_vti_bin/lists.asmx?op=UpdateListItem">http://votre_sharepoint/_vti_bin/lists.asmx?op=UpdateListItem</a>s vous verrez la SOAPAction qu&#8217;il faut définir (cliquez pour agrandir) :<br />
<a href="http://blog.kodono.info/wordpress/wp-content/uploads/2011/12/20111223_Sharepoint_Web_Service.png"><img decoding="async" src="http://blog.kodono.info/wordpress/wp-content/uploads/2011/12/20111223_Sharepoint_Web_Service-300x166.png" alt="Copie d&#039;écran du web service lists.asmx" title="20111223_Sharepoint_Web_Service" width="300" height="166" class="aligncenter size-medium wp-image-819" srcset="https://blog.kodono.info/wordpress/wp-content/uploads/2011/12/20111223_Sharepoint_Web_Service-300x166.png 300w, https://blog.kodono.info/wordpress/wp-content/uploads/2011/12/20111223_Sharepoint_Web_Service-1024x569.png 1024w, https://blog.kodono.info/wordpress/wp-content/uploads/2011/12/20111223_Sharepoint_Web_Service.png 1064w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Dans l&#8217;exemple ci-dessus il faut donc définir l&#8217;header &#8220;SOAPAction&#8221; avec la valeur &#8220;http://schemas.microsoft.com/sharepoint/soap/UpdateListItems&#8221;.<br />
Si vous utilisez l&#8217;AJAX de jQuery cela donnera quelque chose comme ça :</p>
<pre class="brush: javascript">
jQuery.ajax({
        url: "http://your_sharepoint/_vti_bin/lists.asmx",
        type: "POST",
        dataType: "xml",
        data: soapEnv,
        beforeSend: function(xhr) { xhr.setRequestHeader('SOAPAction', 'http://schemas.microsoft.com/sharepoint/soap/UpdateListItems'); },
        contentType: "text/xml; charset=\"utf-8\""
    });
</pre>
<p>Si vous utilisez l&#8217;add-on Firefox <a href="https://addons.mozilla.org/fr/firefox/addon/poster/">Poster</a>, alors utilisez l&#8217;onglet &#8220;Headers&#8221;.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.kodono.info/wordpress/2011/12/23/si-vous-avez-lerreur-the-security-validation-for-this-page-is-invalid-sharepoint/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
