tag:blogger.com,1999:blog-35003308270402441392024-03-13T06:12:36.258-07:00Bart's Developer BlogMy experiences as a freelance software engineer (and some other random thoughts)Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-3500330827040244139.post-73478746448861172042011-06-07T02:35:00.001-07:002011-06-07T02:35:34.372-07:00KPI Dashboard<p>Here is a short footage of a KPI (Key Performance Indicator) dashboard I developed together with <a href="http://www.dwis.nl/" target="_blank">DWI Solutions</a></p> <p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:f651a1ec-0dc2-4d40-a183-d55295db7ce5" class="wlWriterEditableSmartContent"><div id="372834f2-1edc-493c-b806-fc8de31fb7c6" style="margin: 0px; padding: 0px; display: inline;"><div><a href="http://www.youtube.com/watch?v=Hp2bE7jpdiI" target="_new"><img src="http://lh5.ggpht.com/-wvvBP-N7ilM/Te3w5dkGrLI/AAAAAAAAAD0/O52TX-0dCg0/videoc487b8873cfa%25255B21%25255D.jpg?imgmax=800" style="border-style: none" galleryimg="no" onload="var downlevelDiv = document.getElementById('372834f2-1edc-493c-b806-fc8de31fb7c6'); downlevelDiv.innerHTML = "<div><object width=\"448\" height=\"252\"><param name=\"movie\" value=\"http://www.youtube.com/v/Hp2bE7jpdiI?hl=en&hd=1\"><\/param><embed src=\"http://www.youtube.com/v/Hp2bE7jpdiI?hl=en&hd=1\" type=\"application/x-shockwave-flash\" width=\"448\" height=\"252\"><\/embed><\/object><\/div>";" alt=""></a></div></div><div style="width:448px;clear:both;font-size:.8em">Footage of the KPI dashboard</div></div> </p> <p>The system imports data from another system on a fixed interval, stores it in a local (embedded) MS SQL database and presents the data in an easy to digest form on a widescreen monitor.</p> Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-35085222893655529862011-06-03T02:34:00.001-07:002011-06-03T02:34:02.624-07:00Game development on Software Engineering Radio<p><a href="http://lh6.ggpht.com/-uHmQEm0GJYs/TeiqhRD006I/AAAAAAAAADs/O589eXTFdKw/s1600-h/image%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-2dTHH6DPwZo/Teiqidl_1TI/AAAAAAAAADw/ITSVwfFLazg/image_thumb%25255B1%25255D.png?imgmax=800" width="373" height="55" /></a></p> <p>If you’re interested in game development you may want to listen to <a href="http://www.se-radio.net/2011/05/episode-175-game-development-with-andrew-brownsword/" target="_blank">this episode</a> of the Software Engineering Radio podcasts. In this interview, a veteran game developer/chief architect working at Electronic Arts discusses past and current game development. </p> Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-71551933915439497672011-05-31T05:03:00.001-07:002011-06-01T01:42:58.846-07:00QuizXpress Promo Video<p>We just placed our new QuizXpress promotion video online:</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:03c43b14-f697-4ede-a121-d3653671a4d4" class="wlWriterEditableSmartContent"><div id="038bc956-4962-4782-bd34-d08051e43479" style="margin: 0px; padding: 0px; display: inline;"><div><a href="http://www.youtube.com/watch?v=UwSVOp-5Z50" target="_new"><img src="http://lh6.ggpht.com/-AInH-BAzXic/TeX7VDX46OI/AAAAAAAAADo/K4tjuIGOoKI/videobf07cded1fa6%25255B10%25255D.jpg?imgmax=800" style="border-style: none" galleryimg="no" onload="var downlevelDiv = document.getElementById('038bc956-4962-4782-bd34-d08051e43479'); downlevelDiv.innerHTML = "<div><object width=\"448\" height=\"252\"><param name=\"movie\" value=\"http://www.youtube.com/v/UwSVOp-5Z50?hl=en&hd=1\"><\/param><embed src=\"http://www.youtube.com/v/UwSVOp-5Z50?hl=en&hd=1\" type=\"application/x-shockwave-flash\" width=\"448\" height=\"252\"><\/embed><\/object><\/div>";" alt=""></a></div></div><div style="width:448px;clear:both;font-size:.8em">A promotional overview of the QuizXpress features</div></div> Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-37725176145519932902011-05-15T12:48:00.001-07:002011-05-15T12:48:18.490-07:00IE9 Crash on closing tab/exit<p>After upgrading to IE9 I started to experience frequent crashes when closing a tab or closing IE. When attaching the VS2010 debugger it showed me the following call stack:</p> <p>>    KernelBase.dll!_DebugBreak@0()  + 0x2 bytes    <br />     d3d9d.dll!_MemState()  + 0xae bytes    <br />     d3d9d.dll!_MemFini()  + 0x29 bytes    <br />     d3d9d.dll!_DllMain@12()  + 0x32b bytes    <br />     d3d9d.dll!__CRT_INIT@12()  + 0x26d bytes    <br />     IEShims.dll!CShimBindings::DllMainHook()  + 0x72 bytes    <br />     IEShims.dll!CShimBindings::s_DllMainHook()  + 0x49 bytes    <br />     ntdll.dll!_LdrpCallInitRoutine@16()  + 0x14 bytes    <br />     ntdll.dll!_LdrShutdownProcess@0()  - 0x2ae bytes    <br />     ntdll.dll!_RtlExitUserProcess@4()  + 0x74 bytes    <br />     kernel32.dll!76532164()     <br />     msvcrt.dll!___crtExitProcess()  + 0x17 bytes    <br />     msvcrt.dll!__cinit()  + 0x13c8 bytes    <br />     msvcrt.dll!_exit()  + 0x11 bytes    <br />     iexplore.exe!__initterm_e()  - 0x1973 bytes    <br />     kernel32.dll!@BaseThreadInitThunk@12()  + 0x12 bytes    <br />     ntdll.dll!___RtlUserThreadStart@8()  + 0x27 bytes    <br />     ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes    <br /></p> <p>Seeing d3d9d.dll on the callstack finally gave me clues to what the reason could be. I installed the DirectX SDK long ago and configured D3D to run in debug mode in stead of the retail <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh5.ggpht.com/_tEyO2YfOTTs/TdAuARW7VHI/AAAAAAAAADY/EYuPYItob_w/wlEmoticon-smile%5B2%5D.png?imgmax=800" />. Apparently something IE does not like!!</p> Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-29638715995053626772011-05-15T08:45:00.001-07:002011-05-16T02:14:58.048-07:00WPF game development<p>Last month I’ve been busy building two educational games. The games are to be used during trainings to entertain the audience and make them learn something around a particular theme as well. The input from the audience is collected using wireless Sony Buzz<sup>TM</sup> PlayStation buzzers. </p> <p>Compared to my earlier experiences with building a game on a managed DirectX game engine, using  WPF was such a great experience. Expressing your ideas in XAML is so much better trying to paint al the stuff yourself using GDI+!</p> <p>Here are some screenshots:</p> <p>the buzzer sign-in screen (carousel):</p> <p><a href="http://lh5.ggpht.com/_tEyO2YfOTTs/Tc_1HYuM78I/AAAAAAAAAC4/9nwzjlEmO7w/s1600-h/Buzzers%5B3%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Buzzers" border="0" alt="Buzzers" src="http://lh4.ggpht.com/_tEyO2YfOTTs/Tc_1H4qFn8I/AAAAAAAAAC8/t5shd6Qvl48/Buzzers_thumb%5B1%5D.png?imgmax=800" width="442" height="250" /></a></p> <p><a href="http://lh6.ggpht.com/_tEyO2YfOTTs/Tc_1IWal-CI/AAAAAAAAADA/B1Eg6Z6GgBM/s1600-h/SentenceGame%5B4%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SentenceGame" border="0" alt="SentenceGame" src="http://lh4.ggpht.com/_tEyO2YfOTTs/Tc_1Ir1mFjI/AAAAAAAAADE/1wg15nYEMb0/SentenceGame_thumb%5B2%5D.png?imgmax=800" width="439" height="347" /></a></p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:64a51cf0-ce68-47ff-ab22-9f778f65815b" class="wlWriterEditableSmartContent"><div id="108d73be-d917-4816-acfb-c5e5402145b0" style="margin: 0px; padding: 0px; display: inline;"><div><a href="http://www.youtube.com/watch?v=T7EzkFtiuH8" target="_new"><img src="http://lh4.ggpht.com/_tEyO2YfOTTs/TdDrEZ4CWMI/AAAAAAAAADc/bayg_zz4FGM/video1a6575d889bd%5B5%5D.jpg?imgmax=800" style="border-style: none" galleryimg="no" onload="var downlevelDiv = document.getElementById('108d73be-d917-4816-acfb-c5e5402145b0'); downlevelDiv.innerHTML = "<div><object width=\"448\" height=\"252\"><param name=\"movie\" value=\"http://www.youtube.com/v/T7EzkFtiuH8?hl=en&hd=1\"><\/param><embed src=\"http://www.youtube.com/v/T7EzkFtiuH8?hl=en&hd=1\" type=\"application/x-shockwave-flash\" width=\"448\" height=\"252\"><\/embed><\/object><\/div>";" alt=""></a></div></div><div style="width:448px;clear:both;font-size:.8em">See this game in action…</div></div> <p><a href="http://lh3.ggpht.com/_tEyO2YfOTTs/Tc_4GSyKtNI/AAAAAAAAADI/6pDqox94OBc/s1600-h/image%5B6%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_tEyO2YfOTTs/Tc_4HAqqfJI/AAAAAAAAADM/HkabLLZ3VLY/image_thumb%5B2%5D.png?imgmax=800" width="436" height="337" /></a></p> <p>The score screen</p> <p><a href="http://lh5.ggpht.com/_tEyO2YfOTTs/Tc_4HqDTMMI/AAAAAAAAADQ/4qYnfbiuu_E/s1600-h/image%5B10%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_tEyO2YfOTTs/Tc_4IGwOMJI/AAAAAAAAADU/1vuuYWUin6E/image_thumb%5B4%5D.png?imgmax=800" width="444" height="345" /></a></p> <p>Some things I found during the project:</p> <ul> <li>Animations don’t always run as smooth as you’d like </li> <li>Sound support depends on having Media Player 10 or higher on the system (at least when using the MediaPlayer class) </li> </ul> <p>Overall it’s great. I think we’ll soon start moving QuizXpress to WPF!</p> Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-74371655875042575022011-01-07T10:28:00.000-08:002011-05-15T09:31:31.824-07:00The Tao of programming…<p><em>Thus spoke the master programmer: </em></p> <p><em>“After three days without programming, life becomes meaningless.'' </em></p> <p><img src="http://veronicaplace.files.wordpress.com/2011/01/tao-character1.gif" width="111" height="111" /></p> <p>I lost sight of it for a while but every programmer should know about "The Tao of programming" to be found <a href="http://www.canonical.org/~kragen/tao-of-programming.html" target="_blank">here</a>. Some extract I like:</p> <p><em>A master programmer passed a novice programmer one day. The master noted the novice's preoccupation with a hand-held computer game. ``Excuse me,'' he said, ``may I examine it?'' </em></p> <p><em>The novice bolted to attention and handed the device to the master. ``I see that the device claims to have three levels of play: Easy, Medium, and Hard,'' said the master. ``Yet every such device has another level of play, where the device seeks not to conquer the human, nor to be conquered by the human.'' </em></p> <p><em>``Pray, great master,'' implored the novice, ``how does one find this mysterious setting?'' </em></p> <p><em>The master dropped the device to the ground and crushed it underfoot. And suddenly the novice was enlightened. </em></p> Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-3296181210782667102010-06-08T13:23:00.000-07:002010-06-08T13:23:01.480-07:00Cool icons for freeAn extremely cool set of free icons can be found here:<br />
http://icons.mysitemyway.com/<br />
on a well organised website, downloadable both as individuals png's and complete zip files. Enjoy!Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com1tag:blogger.com,1999:blog-3500330827040244139.post-14330458591383699592010-04-22T06:26:00.000-07:002010-04-22T06:26:13.774-07:00SharePoint name.dll ActiveX issue on public facing sitesFor the SharePoint issue with regard to the name.dll ActiveX popup in IE:<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;">The Web site wants to run the following add-on: 'Name ActiveX Control' from 'Microsoft Corporation'. If you trust the Web site and the add-on and want to allow it to run, click here…</span><br />
<br />
<a href="http://vspug.com/mossman/2007/09/13/fixing-the-name-dll-activex-problem-the-mossman-way/">Here</a> is a simple solution that I successfully applied:Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-90818605633196936572010-04-01T07:23:00.000-07:002010-04-01T07:28:33.937-07:00LHCYesterday, LHC at CERN produced its first real results. A giant machine that in the end outputs a datastream of about 2 Gb per second containing the ultimate secrets of reality encoded in bits and bytes. A solid proof that everything really is just <i>information</i>!Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-39366322768526300152010-01-21T03:05:00.001-08:002010-01-21T03:07:10.297-08:00using using<p>In C++ we have what is called ‘deterministic finalization’ which means that the lifetime of an object is predictable. In .NET however we don’t; the garbage collector takes care of deleting objects and when this happens is not defined. </p> <p>This makes all kinds of nice patterns we were able to use in C++ impossible. Fortunately, there is a solution in .NET by using the <em>IDisposable</em> interface. In .NET all classes that manage some expensive resource implement this interface and it is up to you, the developer, to make sure the <em>Dispose</em>() method is called appropriately. This is actually not so nice, for example think of exceptions that may occur before you’re able to call <em>Dispose() ( and when you happen to be a SharePoint dev you must <u>really</u> ensure proper use of Dispose() or you may quickly exhaust your server)</em></p> <p>Fortunately the C# compiler helps here by providing the <em>using()</em> statement that ensures a call to <em>Dispose() </em>on your object<em>,</em> no matter what.</p> <p>Having said this I come to my point, which is that we can also use <em>IDisposable </em>nicely for other purposes then freeing up resources.</p> <p>For example, in good old MFC we had a class called <em>CWaitCursor</em> which one could put at the entry of a lengthy UI method. When the <em>CWaitCursor</em> object was constructed the cursor would show a wait cursor, when the method finished, the object would go out of scope and the cursor would be reset, nice. In .NET we don’t have it, but we can use <em>IDisposable</em> and <em>using()</em> to achieve the same behavior.</p> <p>So what we want is to write:</p> <pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">using (WaitCursor w = <span style="color: #0000ff">new</span> WaitCursor())<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">{<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #008000">// lengthy operation:</span><br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> Thread.Sleep(2000);<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">}<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre></pre><br /><br /><p>In order to achieve this, we make a simple class as follows:</p><br /><br /><pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"><span style="color: #0000ff">class</span> WaitCursor : IDisposable<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">{<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">private</span> Cursor _prev = Cursors.Default;<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">public</span> WaitCursor()<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> {<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> _prev = Cursor.Current;<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> Cursor.Current = Cursors.WaitCursor;<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> }<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> ~WaitCursor()<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> {<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> Cursor.Current = _prev;<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> }<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> #region IDisposable Members<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Dispose()<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> {<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> Cursor.Current = _prev;<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> GC.SuppressFinalize(<span style="color: #0000ff">this</span>);<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> }<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> #endregion<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">}<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre></pre><br /><br /><p>Of course this is a very simple example but it shows an alternate use of <em>using()</em> and <em>IDisposable</em> and can be applied to many more scenarios. It sure beats writing <em>try{} catch{} finally{} </em>to set/unset all sorts of state.</p> Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-88344980835419281702010-01-20T02:39:00.001-08:002010-01-20T02:39:02.010-08:00SharePoint Connections 2010, Amsterdam<p>Last 2 days I was at the SharePoint Connections 2010 conference in Amsterdam. All about the upcoming release of SharePoint. Some things I took home from the conference (as I walked the dev track, most of it is dev related):</p> <p><strong>Good news for developers</strong>! Our lives will definitely be more easy with SP2010. </p> <ul> <li>Client side object model, no longer a need to manually craft Xml messages. The model comes in three flavors:  <br />        for JavaScript <br />        for Silverlight <br />        for normal .NET apps <br />    I guess each of them will have different limitations <br />    Btw, a company named HubKey has a flavor of this already available for 2007 see <a title="http://www.hubkey.com/sharepointapi.aspx" href="http://www.hubkey.com/sharepointapi.aspx">http://www.hubkey.com/sharepointapi.aspx</a> <br />    The 2010 client OM will obviously be a subset of the full SP OM. </li> <li>Ajax supported out of the box, no longer a need to adjust web.config </li> <li>WCF Ajax enabled webservices work out of the box, no longer a need to build/register your own Vvirtual Path Provider </li> <li>Visual WebParts, user control support ala SmartPart out of the box </li> <li>Silverlight support out of the box. There is a standard Silverlight webpart that you can point to a .xap and have it rendered on a page </li> <li>Full integration in VS2010; 'F5' debugging experience, all kinds of SP project templates, a BDC designer etc.</li> <li>SandBoxed solutions, although it has some limitations (e.g. no Visual WebParts) this gives devs better deployment options (site level iso farm level) </li> </ul> <p>Very interesting was the presentation given by <em>Peli de Halleux</em>, a MS researcher who works on tools and frameworks (<a title="http://research.microsoft.com/en-us/projects/pex/" href="http://research.microsoft.com/en-us/projects/pex/">http://research.microsoft.com/en-us/projects/pex/</a>) to automate unit testing. He basically developed a way to ‘mole’ (stub) the SharePoint API so you can unittest your SharePoint code without……..SharePoint, yeah. I wonder how far they can take this for more complex code…</p> Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-7239379599256047482010-01-08T05:43:00.001-08:002010-01-08T05:43:22.923-08:00Opening editable Office documents located in a WebDAV folder from a browser<p>When you want to store Office documents on your webserver and allow users to edit these documents, WebDAV is a very nice way to do so. However, opening this docs in edit mode from an ASP page is not possible without some client side scripting and an ActiveX component. As part of the Office SharePoint integration comes a handy ActiveX component that happens to work for WebDAV as well. The following script shows you how to do so.</p> <pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"><script type="<span style="color: #8b0000">text/javascript</span>"><br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">var</span> v_stsOpenDoc = <span style="color: #0000ff">null</span>;<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">var</span> v_strStsOpenDoc = <span style="color: #0000ff">null</span>;<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">function</span> StsOpenEnsureEx(szProgId) {<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">if</span> (v_stsOpenDoc == <span style="color: #0000ff">null</span>) {<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> v_stsOpenDoc = <span style="color: #0000ff">new</span> ActiveXObject(szProgId);<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> v_strStsOpenDoc = szProgId;<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> }<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">return</span> v_stsOpenDoc;<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> }<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">function</span> Open(url) {<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #008000">// call webservice</span><br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">var</span> pid = StsOpenEnsureEx("<span style="color: #8b0000">SharePoint.OpenDocuments.3</span>");<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> pid.EditDocument3(<span style="color: #0000ff">window</span>, url, <span style="color: #0000ff">false</span>);<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> }<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> <span style="color: #0000ff">function</span> Button2_onclick() {<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> Open("<span style="color: #8b0000">http://localhost:1966/docs/doc1.docx</span>");<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"> }<br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></script><br /></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre></pre><br /><br /><p>Once the doc is opened in Word, whenever the user saves the document, it will be saved on the webserver.</p><br /><br /><p>For Office 2003, use <em>SharePoint.OpenDocuments.2</em> for the progid</p> Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-64186613988716563362009-12-01T07:42:00.000-08:002009-12-01T07:53:41.280-08:00Production server stops with: Retrieving the COM class factory for component with CLSID {BDEADEE2-C265-11D0-BCED-00A0C90AB50F} failed due to the following error:800703fa.SharePoint server stops working with: Retrieving<br />
the COM class factory for component with CLSID<br />
{BDEADEE2-C265-11D0-BCED-00A0C90AB50F} failed due to the following error:<br />
800703fa<br />
<br />
<b>If you have this error run IISRESET and everything works again. This must be some temporarely corruption.</b><br />
<br />
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Lucida Console";
panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:0cm;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
h1
{mso-style-link:"Kop 1 Char";
margin-right:0cm;
margin-left:0cm;
font-size:18.0pt;
font-family:"Verdana","sans-serif";
color:red;
font-weight:normal;}
h2
{mso-style-link:"Kop 2 Char";
margin-right:0cm;
margin-left:0cm;
font-size:14.0pt;
font-family:"Verdana","sans-serif";
color:maroon;
font-weight:normal;}
code
{font-family:"Courier New";}
pre
{mso-style-link:"HTML - vooraf opgemaakt Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Lucida Console";}
span.Kop1Char
{mso-style-name:"Kop 1 Char";
mso-style-link:"Kop 1";
font-family:"Verdana","sans-serif";
color:red;}
span.Kop2Char
{mso-style-name:"Kop 2 Char";
mso-style-link:"Kop 2";
font-family:"Verdana","sans-serif";
color:maroon;}
span.HTML-voorafopgemaaktChar
{mso-style-name:"HTML - vooraf opgemaakt Char";
mso-style-link:"HTML - vooraf opgemaakt";
font-family:"Lucida Console";}
.MsoPapDefault
{margin-bottom:10.0pt;
line-height:115%;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
{page:Section1;}
-->
</style><br />
<br />
<div class=Section1><br />
<p class=MsoNormal style='line-height:normal'><span lang=EN-US
style='font-size:18.0pt;font-family:"Verdana","sans-serif";color:red'>Server<br />
Error in '/' Application. </span></p><br />
<div class=MsoNormal align=center style='text-align:center;line-height:normal'><span
style='font-size:18.0pt;font-family:"Verdana","sans-serif";color:red'><br />
<br />
<hr size=1 width="100%" noshade style='color:silver' align=center><br />
</span></div><br />
<p class=MsoNormal style='line-height:normal'><i><span lang=EN-US
style='font-size:14.0pt;font-family:"Verdana","sans-serif";color:maroon'>Retrieving<br />
the COM class factory for component with CLSID<br />
{BDEADEE2-C265-11D0-BCED-00A0C90AB50F} failed due to the following error:<br />
800703fa.</span></i><span lang=EN-US style='font-size:14.0pt;font-family:"Verdana","sans-serif";
color:maroon'> </span></p><br />
<p class=MsoNormal style='margin-bottom:12.0pt;line-height:normal'><b><span
lang=EN-US style='font-size:8.5pt;font-family:"Verdana","sans-serif";
color:black'>Description: </span></b><span lang=EN-US style='font-size:8.5pt;
font-family:"Arial","sans-serif";color:black'>An unhandled exception occurred<br />
during the execution of the current web request. Please review the stack trace<br />
for more information about the error and where it originated in the code. <br />
</span><b><span lang=EN-US style='font-size:8.5pt;font-family:"Verdana","sans-serif";
color:black'>Exception Details: </span></b><span lang=EN-US style='font-size:
8.5pt;font-family:"Arial","sans-serif";color:black'>System.Runtime.InteropServices.COMException:<br />
Retrieving the COM class factory for component with CLSID<br />
{BDEADEE2-C265-11D0-BCED-00A0C90AB50F} failed due to the following error:<br />
800703fa.<br />
<br />
<br />
<br />
</span><b><span style='font-size:8.5pt;font-family:"Verdana","sans-serif";
color:black'>Source Error:</span></b><span style='font-size:8.5pt;font-family:
"Arial","sans-serif";color:black'> </span></p><br />
<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
style='width:100.0%;background:#FFFFCC'><tr> <td style='padding:.75pt .75pt .75pt .75pt'><br />
<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:black'>An unhandled exception was generated during the execution of the<br />
current web request. Information regarding the origin and location of the<br />
exception can be identified using the exception stack trace below.</span><span
lang=EN-US style='font-size:8.5pt;font-family:"Verdana","sans-serif";
color:black'> </span></p></td> </tr>
</table><br />
<p class=MsoNormal style='margin-bottom:12.0pt;line-height:normal'><span
lang=EN-US style='font-size:8.5pt;font-family:"Arial","sans-serif";color:black'><br />
<br />
</span><b><span style='font-size:8.5pt;font-family:"Verdana","sans-serif";
color:black'>Stack Trace:</span></b><span style='font-size:8.5pt;font-family:
"Arial","sans-serif";color:black'> </span></p><br />
<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
style='width:100.0%;background:#FFFFCC'><tr> <td style='padding:.75pt .75pt .75pt .75pt'><br />
<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> </span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'>[COMException (0x800703fa): Retrieving the COM class factory for<br />
component with CLSID {BDEADEE2-C265-11D0-BCED-00A0C90AB50F} failed due to the<br />
following error: 800703fa.]</span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> Microsoft.SharePoint.Library.SPRequest..ctor() +104</span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(Boolean<br />
bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[]<br />
UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean<br />
bAsAnonymous) +238</span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> Microsoft.SharePoint.SPWeb.InitializeSPRequest() +455</span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> Microsoft.SharePoint.SPWeb.EnsureSPRequest() +75</span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> Microsoft.SharePoint.SPWeb.get_Request() +74</span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> <br />
Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext<br />
context) +613</span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> Microsoft.SharePoint.WebControls.SPControl.GetContextWeb(HttpContext<br />
context) +41</span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> <br />
Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PostResolveRequestCacheHandler(Object<br />
oSender, EventArgs ea) +595</span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> <br />
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()<br />
+80</span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
normal'><span lang=EN-US style='font-size:9.0pt;font-family:"Lucida Console";
color:black'> System.Web.HttpApplication.ExecuteStep(IExecutionStep step,<br />
Boolean& completedSynchronously) +171</span></p></td> </tr>
</table><br />
<p class=MsoNormal><span lang=EN-US> </span></p><br />
</div>Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-24742355403682909512009-10-17T07:39:00.001-07:002009-10-17T07:39:34.986-07:00QuizXpress site is live!<p>After lots of hard work we’re done with our new release of the QuizXpress product suit and website. Details can be found at <a href="http://www.quizxpress.com">http://www.quizxpress.com</a>. </p> Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com0tag:blogger.com,1999:blog-3500330827040244139.post-68290912347750264172009-09-18T08:10:00.000-07:002009-09-18T08:14:29.675-07:00SharePoint error of the dayToday one of our servers in the farm start failing on some sites with the error below. Appearantly we're the only one, Googling on PreInitServer and '[COMException (0x80004005): Cannot complete this action. ' yields nothing. We're hoping a reboot tonight will resolve something here as we recently installed report server in the farm.<br /><br /><span style="font-family:arial;"><span style="font-size:85%;"><span style="color:#ff6666;">Server Error in '/' Application.</span><br />--------------------------------------------------------------------------------<br /><br />Cannot complete this action.<br /><br />Please try again.<br />Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.<br /><br />Exception Details: System.Runtime.InteropServices.COMException: Cannot complete this action.<br /><br />Please try again.<br /><br />Source Error:<br /><br />An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.<br /><br />Stack Trace:<br /><br /><br />[COMException (0x80004005): Cannot complete this action.<br /><br />Please try again.]<br />Microsoft.SharePoint.Library.SPRequestInternalClass.PreInitServer(String bstrAbsoluteRequestUrl, String bstrServerRelativeUrl, Int32 lZone, Guid gApplicationId, Guid gSiteId, Guid gDatabaseId, String bstrDatabaseServer, String bstrDatabaseName, String bstrDatabaseUsername, String bstrDatabasePassword, Boolean fHostHeaderIsSiteName) +0<br />Microsoft.SharePoint.Library.SPRequest.PreInitServer(String bstrAbsoluteRequestUrl, String bstrServerRelativeUrl, Int32 lZone, Guid gApplicationId, Guid gSiteId, Guid gDatabaseId, String bstrDatabaseServer, String bstrDatabaseName, String bstrDatabaseUsername, String bstrDatabasePassword, Boolean fHostHeaderIsSiteName) +359<br /><br />[SPException: Cannot complete this action.<br /><br />Please try again.]<br />Microsoft.SharePoint.Library.SPRequest.PreInitServer(String bstrAbsoluteRequestUrl, String bstrServerRelativeUrl, Int32 lZone, Guid gApplicationId, Guid gSiteId, Guid gDatabaseId, String bstrDatabaseServer, String bstrDatabaseName, String bstrDatabaseUsername, String bstrDatabasePassword, Boolean fHostHeaderIsSiteName) +479<br />Microsoft.SharePoint.SPSite.PreinitializeServer(SPRequest request) +666<br />Microsoft.SharePoint.SPWeb.InitializeSPRequest() +548<br />Microsoft.SharePoint.SPWeb.EnsureSPRequest() +75<br />Microsoft.SharePoint.SPWeb.get_Request() +74<br />Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context) +613<br />Microsoft.SharePoint.WebControls.SPControl.GetContextWeb(HttpContext context) +41<br />Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PostResolveRequestCacheHandler(Object oSender, EventArgs ea) +595<br />System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80<br />System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171<br /><br /></span></span>Bart van Haaffhttp://www.blogger.com/profile/06012427930592259604noreply@blogger.com1