<?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>Avivo Tech Blog &#187; bug</title>
	<atom:link href="http://tech.avivo.si/tag/bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.avivo.si</link>
	<description>Solving problems</description>
	<lastBuildDate>Tue, 24 Jan 2012 14:46:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Client does not support authentication protocol requested by server; consider upgrading MySQL client</title>
		<link>http://tech.avivo.si/2009/03/client-does-not-support-authentication-protocol-requested-by-server-consider-upgrading-mysql-client/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=client-does-not-support-authentication-protocol-requested-by-server-consider-upgrading-mysql-client</link>
		<comments>http://tech.avivo.si/2009/03/client-does-not-support-authentication-protocol-requested-by-server-consider-upgrading-mysql-client/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 14:57:20 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[System administration]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[Client does not support authentication protocol requested by server; consider upgrading MySQL client]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.sweetucan.com/?p=44</guid>
		<description><![CDATA[If you got this strange message on MySQL: Client does not support authentication protocol requested by server; consider upgrading MySQL client Then you will need to do the following: Start DOS mysql script manager with command (I assume that you put MySQL/bin to the PATH enviroment variable): mysql -u [dbusername] -p, where dbusername is username [...]]]></description>
			<content:encoded><![CDATA[<p>If you got this strange message on MySQL:</p>
<p><em>Client does not support authentication protocol requested by server; consider upgrading MySQL client</em></p>
<p>Then you will need to do the following:</p>
<ol>
<li>Start DOS <strong>mysql </strong>script manager with command (I assume that you put MySQL/bin to the PATH enviroment variable):<br />
<strong>mysql -u [dbusername] -p</strong>, where dbusername is username for your database</li>
<li>Enter your current password and you will get <strong>mysql &gt; </strong>prompt</li>
<li>Type:<br />
<strong>SET PASSWORD = OLD_PASSWORD(&#8216;MyPassword&#8217;);</strong></li>
<li>Type:<br />
<strong>FLUSH PRIVILEGES;</strong></li>
</ol>
<p>And thats it!</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2009/03/client-does-not-support-authentication-protocol-requested-by-server-consider-upgrading-mysql-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ArrayOfXElement not recognized by Silverlight 2.0</title>
		<link>http://tech.avivo.si/2009/03/arrayofxelement-not-recognized-by-silverlight-20/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=arrayofxelement-not-recognized-by-silverlight-20</link>
		<comments>http://tech.avivo.si/2009/03/arrayofxelement-not-recognized-by-silverlight-20/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 19:26:54 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[ArrayOfXElement]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[multimedia]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[silverlight 2]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.sweetucan.com/?p=40</guid>
		<description><![CDATA[Last weekend I was working on a Silverlight 2.0 game that loads and saves scores to an external database. Database is accessed via web service which has two methods: GetScore and SaveScore. GetScore returns DataSet and SaveScore returns nothing. Web service proxy is generated as usual &#8211; right click on the project node in VS2008, [...]]]></description>
			<content:encoded><![CDATA[<p>Last weekend I was working on a Silverlight 2.0 game that loads and saves scores to an external database. Database is accessed via web service which has two methods: GetScore and SaveScore. GetScore returns DataSet and SaveScore returns nothing.</p>
<p>Web service proxy is generated as usual &#8211; right click on the project node in VS2008, &#8220;Add Service Reference&#8230;&#8221;, enter url, proxy class is generated and the methods are accessible in the code. But when I tried to build the project an error occured: <em>&#8220;The type or namespace name &#8216;ArrayOfXElement&#8217; does not exist in the namespace&#8221;</em> which means that <strong>ArrayOfXElement is unrecognized</strong> class for the compiler. Searching on the Google reveals that this happens when service method returns DataSet, so <strong>ArrayOfXElement is actually DataSet</strong> and <strong>DataSets are not supported in Silverlight 2.0</strong>.</p>
<p>A quick solution is to replace all &#8216;ArrayOfXElement&#8217; words with &#8216;object&#8217;. Project would build that way but the data would have no meaning.</p>
<p>Another solution is to change the web service return type but this is not always editable by the client side developer.</p>
<p>Finally, workaround idea is to<strong> get DataSet schema and convert it to a class</strong>. How to do this?<br />
1. Create a dummy WPF project.<br />
2. Add web service reference to the WPF project. Return type is DataSet instead of ArrayOfXElement.<br />
3. Write some code to call a web service methods that returns DataSet then extract xsd schema and save it to the disk. Build and run. Sample:<br />
<span>GameServiceClient client = new GameServiceClient();</span><br />
<span>DataSet ds = client.GetScore(1, &#8220;abc&#8221;, &#8220;&#8221;, DateTime.Now);</span><br />
<span>ds.WriteXmlSchema(@&#8221;C:\Temp\Score.xsd&#8221;);</span><br />
4. So you have the xsd file. Now find &#8216;xsd.exe&#8217; which is located in the same directory as &#8216;svcutil.exe&#8217; (e.g. <em>C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin</em>). Run it with arguments:<br />
<span>xsd C:\Temp\Score.xsd /c</span><br />
5. xsd tool generates Score.cs file which contains tables as classes and columns as properties. Include the generated file in the Silverlight project.<br />
6. Replace all &#8216;ArrayOfXElement&#8217; words with &#8216;NewDataSet&#8217; or other class name, depends on the retrieved DataSet name and generated code.</p>
<p>Note that this is just an idea. So far the sample project builds fine but there is a problem with cross-domain security. Another story.</p>
<p>Url to the web service in this example:<br />
<a href="http://www.silverlightclub.com/apps/GameService.asmx">http://www.silverlightclub.com/apps/GameService.asmx</a></p>
<p>References:<br />
<a href="http://silverlight.net/forums/t/60518.aspx">http://silverlight.net/forums/t/60518.aspx</a><br />
<a href="http://blogs.msdn.com/suwatch/archive/2009/01/21/wcf-silverlight-exception-and-serialization.aspx">http://blogs.msdn.com/suwatch/archive/2009/01/21/wcf-silverlight-exception-and-serialization.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2009/03/arrayofxelement-not-recognized-by-silverlight-20/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

