<?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; error</title>
	<atom:link href="http://tech.avivo.si/tag/error/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>String or binary data would be truncated. The statement has been terminated.</title>
		<link>http://tech.avivo.si/2010/12/string-or-binary-data-would-be-truncated-the-statement-has-been-terminated/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=string-or-binary-data-would-be-truncated-the-statement-has-been-terminated</link>
		<comments>http://tech.avivo.si/2010/12/string-or-binary-data-would-be-truncated-the-statement-has-been-terminated/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 12:33:38 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[ms sql server]]></category>
		<category><![CDATA[store procedures]]></category>
		<category><![CDATA[String or binary data would be truncated]]></category>
		<category><![CDATA[string would be truncated]]></category>
		<category><![CDATA[t-sql]]></category>
		<category><![CDATA[The statement has been terminated]]></category>
		<category><![CDATA[transact sql]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=1082</guid>
		<description><![CDATA[If this is not a problem for you that some long string will be truncated and you don&#8217;t want SQL to send you this error just use at the beginning of your StoreProcedure this statement: SET ANSI_WARNINGS OFF]]></description>
			<content:encoded><![CDATA[<p>If this is not a problem for you that some long string will be truncated and you don&#8217;t want SQL to send you this error just use at the beginning of your StoreProcedure this statement:</p>
<pre class=sql>
SET ANSI_WARNINGS OFF
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/12/string-or-binary-data-would-be-truncated-the-statement-has-been-terminated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The custom tool &#8216;MSLinqToSQLGenerator&#8217; failed. Could not retrieve the current project.</title>
		<link>http://tech.avivo.si/2009/09/the-custom-tool-mslinqtosqlgenerator-failed-could-not-retrieve-the-current-project/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-custom-tool-mslinqtosqlgenerator-failed-could-not-retrieve-the-current-project</link>
		<comments>http://tech.avivo.si/2009/09/the-custom-tool-mslinqtosqlgenerator-failed-could-not-retrieve-the-current-project/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 14:30:59 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[linq]]></category>
		<category><![CDATA[linqtosql]]></category>
		<category><![CDATA[MSLinqToSQLGenerator failed]]></category>
		<category><![CDATA[visual studio 2008]]></category>
		<category><![CDATA[vs 2008]]></category>

		<guid isPermaLink="false">http://blog.sweetucan.com/?p=163</guid>
		<description><![CDATA[To correct this, open up the Visual Studio 2008 command prompt (or any command prompt and navigate to the location of the VS exe &#8216;devenv.exe&#8217;) and type the following command: devenv /ResetSkipPkgs Then open your LinqToSql file(s) (*.dbml) and save to trigger the code generator tool.  After that, you should hopefully be up and running [...]]]></description>
			<content:encoded><![CDATA[<p align="left"><span style="font-family: Tahoma;">To correct this, open up the Visual Studio 2008 command prompt (or any command prompt and navigate to the location of the VS exe &#8216;devenv.exe&#8217;) and type the following command:</span></p>
<p align="left"><span style="font-family: Courier;">devenv /ResetSkipPkgs</span></p>
<p align="left"><span style="font-family: Tahoma;">Then open your LinqToSql file(s) (*.dbml) and save to trigger the code generator tool.  After that, you should hopefully be up and running once more.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2009/09/the-custom-tool-mslinqtosqlgenerator-failed-could-not-retrieve-the-current-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Silverlight 2.0 &#8211; Resolved issue: InitializeError #2103 &#8211; Invalid or malformed application</title>
		<link>http://tech.avivo.si/2009/06/silverlight-20-resolved-issue-initializeerror-2103-invalid-or-malformed-application/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=silverlight-20-resolved-issue-initializeerror-2103-invalid-or-malformed-application</link>
		<comments>http://tech.avivo.si/2009/06/silverlight-20-resolved-issue-initializeerror-2103-invalid-or-malformed-application/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 08:59:54 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Silverlight/WPF]]></category>
		<category><![CDATA[2103]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[InitializeError]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[resolved]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://blog.sweetucan.com/?p=105</guid>
		<description><![CDATA[Intro I am working on a project that includes ASP .NET MVC web site and Silverlight 2.0 application. Initialy a Visual Studio solution with both project types has been created. At the beginning, sample Silverlight application worked fine, then most of the time development was going on MVC side. Now, when development should continue on [...]]]></description>
			<content:encoded><![CDATA[<h2>Intro</h2>
<p>I am working on a project that includes ASP .NET MVC web site and Silverlight 2.0 application. Initialy a Visual Studio solution with both project types has been created. At the beginning, sample Silverlight application worked fine, then most of the time development was going on MVC side. Now, when development should continue on Silverlight side browser throws an error:</p>
<p><img src="http://blog.sweetucan.com/wp-content/uploads/2009/06/webpage-error-screenshot.jpg" alt="" /></p>
<p>This blog post explains how the issue has been solved. Resolving issue step by step&#8230;</p>
<h2>1.Check namespaces</h2>
<p><strong>App.xaml</strong> should have <strong>x:Class</strong> attributes formatted as &#8220;<strong>Namespace.ClassName</strong>&#8221; (e.g. &#8220;StudioBikini.ClientSide.App&#8221;).</p>
<p><img src="http://blog.sweetucan.com/wp-content/uploads/2009/06/app-xaml-screenshot.jpg" alt="" /></p>
<p>Same namespace and class name should also appear in <em>App.xaml.cs</em>. Note that namespace and class name are separated in C# file while glued together in XAML.</p>
<p><img src="http://blog.sweetucan.com/wp-content/uploads/2009/06/app-xaml-cs-screenshot.jpg" alt="" /></p>
<h2>2. Change project properties</h2>
<p>When you change a namespace for App in either C# or XAML the Startup object value in properties still holds the previous value.<br />
Right click on a <strong>project </strong>in <strong>Visual Studio</strong> and select <strong>Properties</strong>.<br />
Click on the <strong>Startup object</strong> combobox should open a list of available startup object and select the <strong>Namespace.ClassName</strong>.</p>
<p><img src="http://blog.sweetucan.com/wp-content/uploads/2009/06/properties-screenshot.jpg" alt="" /></p>
<p>Also make sure that <strong>Generate Silverlight manifest file</strong> checkbox is checked and an existing manifest file is selected.</p>
<h2>3. Check manifest file</h2>
<p>Some text editors add <strong>3 garbage bytes</strong> at the beginning of a file which represent encoding. Those three bytes are <strong>invisible</strong> by some editors and may cause xml parsing exception.<br />
Remove <em>Properties\AppManifest.xml</em> file and create it again.</p>
<p><img src="http://blog.sweetucan.com/wp-content/uploads/2009/06/manifest-screenshot.jpg" alt="" /></p>
<h2>4. Other possibilities:</h2>
<ul>
<li> Try to set assembly name and default namespace in the project properties to the same value. Namespace in properties should be the same as namespace in App.</li>
<li>Try with relative or absolute uri or false uri &#8211; if .xap file cannot be found Silverlight plug-in returns error #2104, that is different than #2103. So #2103 indicates that file has been found.</li>
<li>Clear browser&#8217;s cache (downloaded data) and reload the page with Silverlight.</li>
<li>Turn off virus scanner, as some scanners block loading unknown or hidden extensions (I had problems with .xaml.js for Silverlight 1.0).</li>
<li>If you are using <em>object</em> tag in html to load .xap file, try to change height in pixels (in case it works on IE7 but not in Firefox 3.0).</li>
<li>There may be an old .xap build. Try to rebuild VS solution or delete <em>bin</em> and <em>obj</em> folders from all projects &#8211; those folders are generated again on next build.</li>
<li>AppManifest.xml file can be <strong>read-only</strong>, usually happens when under a source control system (e.g. <strong>sourcesafe</strong>, svn), so check it out first.</li>
<li>Finally, delete AppManifest.xml, create new one and paste next lines into the file:</li>
</ul>
<blockquote><p>&lt;Deployment xmlns=&#8221;http://schemas.microsoft.com/client/2007/deployment&#8221;<br />
xmlns:x=&#8221;http://schemas.microsoft.com/winfx/2006/xaml&#8221;&gt;<br />
&lt;Deployment.Parts&gt;<br />
&lt;/Deployment.Parts&gt;<br />
&lt;/Deployment&gt;</p></blockquote>
<h2>Solution</h2>
<p>It appears that file was under Visual SourceSafe, problem with locked file. Solution has been found progressively, step by step as described above.</p>
<p><img src="http://blog.sweetucan.com/wp-content/uploads/2009/06/solution-screenshot.jpg" alt="" /></p>
<p>Another time, another project, same error. Problem with an included assembly reference &#8211; a <em>Silverlight Class Library</em> project with web service reference and <em>Silverlight Application</em> project with reference <em>System.ServiceModel</em>&#8230; Resolved by commeting code that uses <em>System.ServiceModel</em> (code when calling web service generated classes). Alternative is to use  <em>release</em> settings instead of <em>debug</em>.</p>
<p>Any other suggestions?</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2009/06/silverlight-20-resolved-issue-initializeerror-2103-invalid-or-malformed-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

