Hi<br>finally, I understood my mistake. I was accessing the search.html page through a z3c.layer.pagelet.IPageletBrowserLayer (following P. Carduner&#39;s tutorial) without including in configure.zcml:<br>&lt;include package=&quot;z3c.pagelet&quot; file=&quot;meta.zcml&quot; /&gt;<br>
&lt;include package=&quot;z3c.pagelet&quot; /&gt;<br>&lt;include package=&quot;z3c.layer.pagelet&quot; /&gt;<br>&lt;include package=&quot;zope.contentprovider&quot; /&gt;<br><br>The z3c unauthorized view is defined in:<br>
z3c.layer.pagelet/trunk/src/z3c/layer/pagelet/browser/__init__.py.<br><br>I needed also to define a layout template for the unauthorized view. So, I added the following in browser/configure.zcml:<br>&lt;z3c:layout<br>        for=&quot;*&quot;             layer=&quot;cdcadama.layer.ICdcadamaBrowserLayer&quot;<br>
        template=&quot;<a href="http://unauthorized.pt">unauthorized.pt</a>&quot;<br>/&gt;   <br><br>where <a href="http://unauthorized.pt">unauthorized.pt</a> is a copy of z3c.layer.pagelet/trunk/src/z3c/layer/pagelet/browser/<a href="http://unauthorized.pt">unauthorized.pt</a>.<br>
<br>And for the moment, it seems ok.<br><br>Regards,<br>Simon<br><br><div class="gmail_quote">On Mon, Jun 15, 2009 at 6:02 PM, Simon Elbaz <span dir="ltr">&lt;<a href="mailto:elbazsimon9@gmail.com">elbazsimon9@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>I have added :<br><br>&lt;include package=&quot;zope.app.exception.browser&quot; /&gt; in the file browser/configure.zcml and the result is the same.<br>
<br>I have identified the function that makes the difference, it is:<br>
&gt; /home/simon/.buildout/eggs/zope.interface-3.5.1-py2.5-linux-i686.egg/zope/interface/adapter.py(478)queryMultiAdapter()<br>-&gt; factory = self.lookup(map(providedBy, objects), provided, name)<br><br>where <br>(Pdb) print objects<br>

(Unauthorized(&lt;zope.app.publisher.browser.viewmeta.SearchAddForm object at 0x9b503cc&gt;, &#39;browserDefault&#39;, &#39;zope.View&#39;), &lt;zope.publisher.browser.BrowserRequest instance URL=<a href="http://localhost:9030/++skin++Login/@@search.html" target="_blank">http://localhost:9030/++skin++Login/@@search.html</a>&gt;)<br>

(Pdb) print provided<br>&lt;InterfaceClass zope.interface.Interface&gt;<br>(Pdb) print name<br>index.html<br><br>I am a little bit stuck ...<br><br>Regards<br><font color="#888888">Simon</font><div><div></div><div class="h5">
<br><br><br><br><div class="gmail_quote">On Sun, Jun 14, 2009 at 1:27 AM, Simon Elbaz <span dir="ltr">&lt;<a href="mailto:elbazsimon9@gmail.com" target="_blank">elbazsimon9@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>I am trying to set a SessionCredentialsPlugin in a application.<br><br>When I try to access the following URL <a href="http://localhost:9030/++skin++Login/@@search.html" target="_blank">http://localhost:9030/++skin++Login/@@search.html</a>, the result of the call:<br>


&gt; /home/simon/.buildout/eggs/zope.app.publication-3.7.0-py2.5.egg/zope/app/publication/zopepublication.py(322)handleException()<br>-&gt; view = zope.component.queryMultiAdapter(<br> (exception, request), name=name)<br>


(Pdb) print view.__init__<br>&lt;bound method Unauthorized.__init__ of &lt;<b>zope.app.http.exception.unauthorized.Unauthorized </b>object at 0x97faa6c&gt;&gt;<br><br>where exception=(&lt;zope.app.publisher.browser.viewmeta.Contents object at 0x89ad5ec&gt;, &#39;browserDefault&#39;, &#39;zope.View&#39;)<br>


<br><br>When I try to access the following URL <a href="http://localhost:9030/" target="_blank">http://localhost:9030/</a>, the result of the call:<br>&gt; /home/simon/.buildout/eggs/zope.app.publication-3.7.0-py2.5.egg/zope/app/publication/zopepublication.py(322)handleException()<br>


-&gt; view = zope.component.queryMultiAdapter((exception, request), name=name)<br>(Pdb) print view.__init__<br>&lt;bound method Unauthorized.__init__ of &lt;<b>zope.app.publisher.browser.viewmeta.Unauthorized</b> object at 0x8badd6c&gt;&gt;<br>


<br>where exception is (&lt;zope.app.publisher.browser.viewmeta.SearchAddForm object at 0x89ad3ec&gt;, &#39;browserDefault&#39;, &#39;cdcadama.View&#39;).<br><br>Could someone explain me why the result is different ?<br>

<br>
Thanks<br><font color="#888888">Simon<br><br><br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>