<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 - Discussions by steinster</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Niners/steinster/Discussions/RSS"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 - Discussions by steinster</title>
		<link>http://channel9.msdn.com/Niners/steinster/Discussions</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Niners/steinster/Discussions</link>
	<language>en</language>
	<pubDate>Wed, 19 Jun 2013 21:05:19 GMT</pubDate>
	<lastBuildDate>Wed, 19 Jun 2013 21:05:19 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>0</c9:totalResults>
	<c9:pageCount>0</c9:pageCount>
	<c9:pageSize>0</c9:pageSize>
	<item>
		<title>Tech Off - Cant get webservice to work. Could not be loaded error</title>
		<description><![CDATA[<p>ah ok, thanks ! <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/Cant-get-webservice-to-work-Could-not-be-loaded-error/ba604ee597f64091b2c1a164015146fa#ba604ee597f64091b2c1a164015146fa</link>
		<pubDate>Wed, 13 Feb 2013 20:27:59 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/Cant-get-webservice-to-work-Could-not-be-loaded-error/ba604ee597f64091b2c1a164015146fa#ba604ee597f64091b2c1a164015146fa</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Cant get webservice to work. Could not be loaded error</title>
		<description><![CDATA[<p>Hi,</p><p>I have this webservice;</p><p><pre class="brush: csharp">public class InfoSpreaderServices : System.Web.Services.WebService
    {

        [WebMethod]
        public void AddUser(int listRecno, string firstname, string lastname, string email) {
            if (!DataManager.EmailExists(listRecno, email)) {
                DataManager.CreateNewRecipient(listRecno, firstname, lastname, email);
            }
            
        }

        [WebMethod]
        public void RemoveUser(int recipientRecno, string email) {
            DataRow r = DataManager.GetListRecipient(recipientRecno);

            if (r[&quot;Email&quot;].ToString() == email) {
                DataManager.DeleteRecipient(recipientRecno);
            }
        }
    }</pre></p><p>&nbsp;</p><p>and I try to use the AddUser method like this;</p><p><pre class="brush: csharp">InfoSpreadServices.InfoSpreaderServicesSoapClient client = new InfoSpreadServices.InfoSpreaderServicesSoapClient();
client.AddUser(int.Parse(TextBoxListRecno.Text), TextBoxFirstname.Text, TextBoxLastname.Text, TextBoxEmail.Text);</pre></p><p>&nbsp;</p><p>But I always get this error;</p><p><strong>The operation 'AddUserAsync' could not be loaded because it has a parameter or return type of type System.ServiceModel.Channels.Message or a type that has MessageContractAttribute and other parameters of different types. When using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method must not use any other types of parameters.</strong></p><p>&nbsp;</p><p>&nbsp;</p><p>any ideas on how to fix this ??</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/Cant-get-webservice-to-work-Could-not-be-loaded-error/1bdddef00e0c421bad8ea164013ffeb1#1bdddef00e0c421bad8ea164013ffeb1</link>
		<pubDate>Wed, 13 Feb 2013 19:25:03 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/Cant-get-webservice-to-work-Could-not-be-loaded-error/1bdddef00e0c421bad8ea164013ffeb1#1bdddef00e0c421bad8ea164013ffeb1</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Dock window - Like Vista Sidebar</title>
		<description><![CDATA[<p>Thanks for many good responses.</p>
<p>&nbsp;</p>
<p>I'll look into Application Desktop Toolbar.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>I like the Sidebar and its gadgets, but I think the developing includes to much&nbsp;scripting for my taste. At least what I've seen&nbsp;after skimming through..</p>
<p>And the format of the UI is very restricted..</p>
<p>&nbsp;</p>
<p>So then I'm gonna make my own SuperSidebar that takes WPF usercontrols&nbsp;as gadgets. And yes, it will rule <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif' alt='Wink' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/487136-Dock-window-Like-Vista-Sidebar/d4f087d5c4934a37a4ba9deb00086ca3#d4f087d5c4934a37a4ba9deb00086ca3</link>
		<pubDate>Fri, 28 Aug 2009 00:29:32 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/487136-Dock-window-Like-Vista-Sidebar/d4f087d5c4934a37a4ba9deb00086ca3#d4f087d5c4934a37a4ba9deb00086ca3</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Dock window - Like Vista Sidebar</title>
		<description><![CDATA[<p>Hi,</p>
<p>&nbsp;</p>
<p>I was just wondering if anyone knows how to make a window dock to one side and when other programs are expanded they dont &quot;overlay&quot; the screen.. just like Vista Sidebar (always visible).</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/487136-Dock-window-Like-Vista-Sidebar/487136#487136</link>
		<pubDate>Thu, 27 Aug 2009 14:08:00 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/487136-Dock-window-Like-Vista-Sidebar/487136#487136</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - ASP.Net - UserControl events in a ListView</title>
		<description><![CDATA[<p>Hi,<br /><br />I have a page with a ListView that contains a custom UserControl. The usercontrol have events, but I cant figure out how to subscribe to these events.<br /><br />I tried to define in the aspx file without any luck. I've also tried to set in in the PreRender event of the usercontrol, but the event are always null in the usercontrol no matter what I do.<br /><br />This is what I got now;<br /><p>protected void animalCardControl1_OnPreRender(object sender, EventArgs e) {<br />animalCardControl a = (animalCardControl)sender;<br /><br />a.DetailsClickedEvent &#43;= new animalCardControl.DetailsClickedHandler(animalCardControl1_DetailsClicked);<br />a.Thumb = IsCheckBoxList;<br /><br />a.LoadAnimal();<br />}</p>
<br /><br />Any suggestions ??</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/466353-ASPNet-UserControl-events-in-a-ListView/466353#466353</link>
		<pubDate>Wed, 22 Apr 2009 00:47:33 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/466353-ASPNet-UserControl-events-in-a-ListView/466353#466353</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - calculating age - getting more details</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">evildictaitor said:</div><div class="quoteText">It looks like you're trying to get the lexical difference between two dates (the lexical distance between 1 Jan and 1 Feb is the same as the distance between 1 Feb and 1 Mar - 1 month, even though it's a different number of
 days)
<div><br /></div>
<div>You've actually made a mistake though - it's 3 months only after we get to April 17: &nbsp;(Jan17 --&gt; Feb17 = 1 month, Feb17 --&gt; Mar17 = 2month, Mar17 --&gt; Apr17 = 3month)<br /><div><br /><div>To do it, you just do what you do for (long) subtraction &nbsp;(writing the date in yyyy/mm/dd format is best)</div>
<div><br /></div>
<div>&nbsp;&nbsp; &nbsp;2009 / 04 / 06<br /></div>
<div>&nbsp;- 1982 / 01 / 17</div>
<div>&nbsp;------------------</div>
<div>&nbsp;&nbsp; &nbsp; Y &nbsp; &nbsp; / M &nbsp; / D</div>
<div><br /></div>
<div>D = 06 - 17, but that's negative, so we need to 'borrow' one from the month category. The number of days 'borrowed' is the number of days in the previous month:</div>
<div><br /></div>
<div>&nbsp;&nbsp; 2009 / 03 / 37</div>
<div>- 1982 / 01 / 17</div>
<div>&nbsp;&nbsp;---------------</div>
<div>&nbsp;&nbsp; &nbsp; Y &nbsp; &nbsp;/ M / 20</div>
<div><br /></div>
<div>For M, we don't need to 'borrow' months from the previous column, since 3 &gt; 1, but if we did, we would borrow the number of months in the previous year, which is always going to be 12.</div>
<div><br /></div>
<div>The result is then</div>
<div><br /></div>
<div><br /></div>
<div>&nbsp;&nbsp; 2009 / 03 / 37</div>
<div>- 1982 / 01 / 17</div>
<div>-----------------</div>
<div>&nbsp;&nbsp; 27 &nbsp;/ 02 / 20</div>
<div><br /></div>
<div>So you are 27 years, 2 months and 20 days old</div>
</div>
</div>
</div></blockquote>Thanks! <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/464063-calculating-age-getting-more-details/820c028eb5cc444c95879deb00050ef3#820c028eb5cc444c95879deb00050ef3</link>
		<pubDate>Mon, 06 Apr 2009 21:59:11 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/464063-calculating-age-getting-more-details/820c028eb5cc444c95879deb00050ef3#820c028eb5cc444c95879deb00050ef3</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>4</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - calculating age - getting more details</title>
		<description><![CDATA[<p>Hi,<br /><br />Im trying to calculate age. I got the year part down, but I also need to know the months..<br /><br />Im born 17 January, 1982, so the result I want is 27 years and 3 months (since we havent passed 17 April yet, then it would be 4 months)<br />But how do I get the months value ?<br /><br />I appreciate any help I can get <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/464063-calculating-age-getting-more-details/464063#464063</link>
		<pubDate>Mon, 06 Apr 2009 20:54:18 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/464063-calculating-age-getting-more-details/464063#464063</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>4</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Image.FromStream - Parameter is not valid. HELP!</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">Dexter said:</div><div class="quoteText">Overall the code looks ok but what bugs me is the way you read data from the stream:<br /><br />1) This code expects the stream Position to be correct (probably 0). Is that always the case? Maybe you accidentally passed in a stream that's positioned at the end?<br />2) You don't check the result of the Stream.Read call. Depending on what type is that stream it is possible that Read returns after reading less that the requested number of bytes.</div></blockquote>
<p>yeah I'll check the stream a little more.<br /><br />but what bugs me the most is that the code works in one app but not the other.<br /><br />the only difference is that I dont declare the connection but get it from another object.<br /><br />I'll start out to duplicate exactly the code and see if it works, and then look at the stream</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/461551-ImageFromStream-Parameter-is-not-valid-HELP/176294eacf694432a6229deb00049082#176294eacf694432a6229deb00049082</link>
		<pubDate>Thu, 19 Mar 2009 22:31:17 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/461551-ImageFromStream-Parameter-is-not-valid-HELP/176294eacf694432a6229deb00049082#176294eacf694432a6229deb00049082</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Image.FromStream - Parameter is not valid. HELP!</title>
		<description><![CDATA[<p>Hi!<br /><br />I started out to create a simple (but cool) image uploader.<br />I created a new web project just to test and got it working.<br /><br />I then copied the code over to my real web app, and guess what; it&nbsp;didnt work!<br /><br />I upload the exact same picture from both applications, but only the one from my test project can be displayed.<br />If I try to display a picture uploaded from the real app in my test project I also get the &quot;Parameter is not valid&quot; when doing Image.FromStream().<br /><br />So I guess there's something happening when it writes the data to the db, but I just cant find out what. Its the exact same code in both web apps.<br /><br />Heres some code;<br /><br /><strong>From my test app:</strong><br /><p>private void SaveImageToDb(Stream imgStream, string contentType, int byteLength) {<br />&nbsp;&nbsp;&nbsp;&nbsp;string sql = &quot;INSERT INTO sysTmpImg_TempImage (sysTmp_recno, sysTmp_contentType, sysTmp_image) VALUES(@recno,&nbsp; contentType, @image)&quot;;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[&quot;myPetDb&quot;].ConnectionString);<br />&nbsp;&nbsp;&nbsp;&nbsp;SqlCommand com = new SqlCommand(sql, conn); </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;byte[] biImage = new byte[byteLength];<br />&nbsp;&nbsp;&nbsp;&nbsp;imgStream.Read(biImage, 0, byteLength);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;com.Parameters.Add(new SqlParameter(&quot;@recno&quot;, Session.SessionID));<br />&nbsp;&nbsp;&nbsp;&nbsp;com.Parameters.Add(new SqlParameter(&quot;@contentType&quot;, contentType));<br />&nbsp;&nbsp;&nbsp;&nbsp;com.Parameters.Add(new SqlParameter(&quot;@image&quot;, biImage));</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;if (conn.State != ConnectionState.Open) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;conn.Open();<br />&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;com.ExecuteNonQuery();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;conn.Close();<br />&nbsp;&nbsp;&nbsp;&nbsp;com.Dispose();<br />&nbsp;&nbsp;&nbsp;&nbsp;imgStream.Dispose();</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;LoadImage(Session.SessionID);<br />}<br /><br />(load image just loads the uploaded image)<br /><br /><strong>From my real app;</strong><br /><br /></p>
<p>public void AddNewTempImage(int usRecno, string tmpRecno, Stream imageStream, string contentType, int byteLength) {<br />&nbsp;&nbsp;&nbsp;&nbsp;byte[] byteImage = new byte[byteLength];<br />&nbsp;&nbsp;&nbsp;&nbsp;imageStream.Read(byteImage, 0, byteLength);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;string sql = &quot;INSERT INTO sysTmpImg_TempImage (sysTmp_recno, sysTmp_US_recno, sysTmp_contentType, sysTmp_image) VALUES(@tmpRecno, @usRecno, @contentType, @image)&quot;;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;SqlCommand com = DataHelper.GetCommand(sql);<br />&nbsp;&nbsp;&nbsp;&nbsp;com.Parameters.Add(new SqlParameter(&quot;@tmpRecno&quot;, tmpRecno));<br />&nbsp;&nbsp;&nbsp;&nbsp;com.Parameters.Add(new SqlParameter(&quot;@usRecno&quot;, usRecno));<br />&nbsp;&nbsp;&nbsp;&nbsp;com.Parameters.Add(new SqlParameter(&quot;@contentType&quot;, contentType));<br />&nbsp;&nbsp;&nbsp;&nbsp;com.Parameters.Add(new SqlParameter(&quot;@image&quot;, byteImage));</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;DataHelper.ExecuteNonQuery(com);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;imageStream.Dispose();<br />}<br /><br /><strong>I'll even throw in the code for the DataHelper object;</strong><br /><br /></p>
<p>internal static class DataHelper<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;public static DataSet Execute(SqlCommand command) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataSet result = new DataSet();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SqlDataAdapter adap = new SqlDataAdapter(command);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adap.Fill(result);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return result;<br />&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;public static void ExecuteNonQuery(SqlCommand command) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CheckConnection(command.Connection);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command.ExecuteNonQuery();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command.Connection.Close();<br />&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;public static object ExecuteScalar(SqlCommand command) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;object result = null;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CheckConnection(command.Connection);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result = command.ExecuteScalar();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command.Connection.Close();</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return result;<br />&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;public static SqlCommand GetCommand() {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return GetCommand(string.Empty);<br />&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;public static SqlCommand GetCommand(string commandText) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SqlCommand result = new SqlCommand(commandText, GetConnection());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//result.CommandType = CommandType.Text;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return result;<br />&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;private static void CheckConnection(SqlConnection connection) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (connection.State == ConnectionState.Closed) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connection.Open();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;private static SqlConnection GetConnection() {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ConnectionStringSettings connString = ConfigurationManager.ConnectionStrings[&quot;mainDb&quot;];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return new SqlConnection(connString.ConnectionString);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br />Even though Im using the datahelper, the result should be the same...<br /><br />I've created a generic handler to display the pictures and this is the line where it fails;<br /><em>System.Drawing.Image img = System.Drawing.Image.FromStream(ms);</em></p>
<p>I could also include the code for the handlers, but since none of them can display anything I upload from my real app (but from my test app) I think the problem must be somewhere in the saving of the images.<br />I've checked the bytes and they match up in length from both the apps.<br /><br />Any ideas ? I've been searching for answers for hours and now the sun is starting to come up so maybe I should get some sleep before&nbsp;I go crazy</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/461551-ImageFromStream-Parameter-is-not-valid-HELP/461551#461551</link>
		<pubDate>Thu, 19 Mar 2009 06:07:34 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/461551-ImageFromStream-Parameter-is-not-valid-HELP/461551#461551</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>