<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>.NET Framework</title><link>https://www.dotnetzone.gr:443/cs/forums/14/ShowForum.aspx</link><description>Θέματα για threading, remoting, reflection, exception handling, security, regex κλπ.</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: Hash value σε cookie</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/17995.aspx</link><pubDate>Thu, 05 Oct 2006 18:12:29 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:17995</guid><dc:creator>Dimitris Papadimitriou</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/17995.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=17995</wfw:commentRss><description>&lt;P&gt;&lt;BLOCKQUOTE&gt;&lt;table width="85%"&gt;&lt;tr&gt;&lt;td class="txt4"&gt;&lt;img src="/cs/Themes/default/images/icon-quote.gif"&gt;&amp;nbsp;&lt;strong&gt;mns wrote:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="quoteTable"&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td valign="top" class="txt4"&gt;Θα σε βοηθήσει η System.Convert.ToBase64String.&lt;BR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/BLOCKQUOTE&gt;&lt;/P&gt;
&lt;P&gt;ΑΚΡΙΒΩΣ αυτό έψαχνα! thanks!&lt;/P&gt;</description></item><item><title>Απ: Hash value σε cookie</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/17993.aspx</link><pubDate>Thu, 05 Oct 2006 18:10:15 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:17993</guid><dc:creator>Dimitris Papadimitriou</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/17993.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=17993</wfw:commentRss><description>&lt;P&gt;Σωστά, μου είχε διαφύγει. Με htmlencode έβγαζε το ίδιο σφάλμα αλλά με urlencode δούλεψε. Και πάλι όμως, το string που παίρνω δεν είναι readble, αν και μπαίνει σε cookie. Σε κάποια παραδείγματα χρήσης hash βλέπω τιμές τύπου:&lt;BR&gt;AjjdOLEmhbT8IR8Pw7MHcPsIlps=&lt;BR&gt;DRQ3p5aj/J16xwELqW4mpKbDxuk=&lt;/P&gt;
&lt;P&gt;Αυτές τις τιμές είναι ευκολότερο και αποδοτικότερο να τις συγκρίνεις με string.compare. Ξέρεις πως μπορώ να πάρω ανάλογες τιμές;&lt;/P&gt;</description></item><item><title>Απ: Hash value σε cookie</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/17992.aspx</link><pubDate>Thu, 05 Oct 2006 18:06:14 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:17992</guid><dc:creator>Νατάσα Μανουσοπούλου</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/17992.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=17992</wfw:commentRss><description>Θα σε βοηθήσει η System.Convert.ToBase64String.&lt;br&gt;&lt;br&gt;</description></item><item><title>Απ: Hash value σε cookie</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/17990.aspx</link><pubDate>Thu, 05 Oct 2006 17:55:55 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:17990</guid><dc:creator>George J. Capnias</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/17990.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=17990</wfw:commentRss><description>&lt;P&gt;Εχμ, HtmlEncode; &lt;/P&gt;
&lt;P&gt;Ότι πρέπει να περάσει μέσα από ένα response, πρέπει να είναι HtmlEncoded...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;George J.&lt;BR&gt;&lt;/P&gt;</description></item><item><title>Hash value σε cookie</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/17987.aspx</link><pubDate>Thu, 05 Oct 2006 17:53:40 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:17987</guid><dc:creator>Dimitris Papadimitriou</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/17987.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=17987</wfw:commentRss><description>&lt;P&gt;Χρησιμοποιώ το παρακάτω για να υπολογίζω το hash για ένα string (μεταβλητή text).&lt;/P&gt;&lt;FONT size=1&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; hash &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt; Security.Cryptography.SHA256Managed&lt;BR&gt;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; enc &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; System.Text.Encoding = System.Text.Encoding.UTF8&lt;BR&gt;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; output &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Byte&lt;/FONT&gt;() = hash.ComputeHash(enc.GetBytes(text))&lt;/P&gt;
&lt;P&gt;Το πρόβλημά μου είναι ότι δεν μπορώ με τίποτα να μετατρέψω το byte array που παίρνω σε ένα string κατάλληλο για να μπει σε cookie. Προσπάθησα να χρησιμοποιήσω διάφορους encoders (ASII, UTF8, UNICODE κλπ.) αλλα τίποτα. Όλα τα string που παίρνω δεν είναι readable και προφανώς κάποιο χαρακτήρες ενοχλούν το cookie.&lt;/P&gt;
&lt;P&gt;Το exception που παίρνω τελικά είναι αυτό (System.Web.WebException): "The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF"&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;</description></item></channel></rss>