tag:blogger.com,1999:blog-60082810459324057182024-03-13T17:12:12.790-04:00Dean's Development Cube.Net, SQL Server, and other related technologiesDean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.comBlogger107125tag:blogger.com,1999:blog-6008281045932405718.post-73665606686794519822016-03-09T12:21:00.001-05:002016-03-09T12:21:02.409-05:00Intro to the Internet of Things using NetduinoThis was my presentation to the .Net Users of Fort Wayne (<a href="http://nufw.net/" rel="nofollow" target="_blank">NUFW</a>) on 3/8/2016.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="355" marginheight="0" marginwidth="0" scrolling="no" src="//www.slideshare.net/slideshow/embed_code/key/DO6YcMq86aABfZ" style="border-width: 1px; border: 1px solid #ccc; margin-bottom: 5px; max-width: 100%;" width="425"> </iframe> <br />
<div style="margin-bottom: 5px;">
<strong> <a href="https://www.slideshare.net/DeanWillson/intro-to-the-internet-of-things-using-netduino" target="_blank" title="Intro to the Internet of Things using Netduino">Intro to the Internet of Things using Netduino</a> </strong> from <strong><a href="https://www.slideshare.net/DeanWillson" target="_blank">Dean Willson</a></strong> </div>
Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com4tag:blogger.com,1999:blog-6008281045932405718.post-61089697472278083072016-03-09T11:45:00.000-05:002016-03-09T12:16:52.981-05:00Index Reorganization and Rebuilding for SuccessOn January 20, I presented an end-to-end process for SQL Server Index rebuilding/reorganization to <a href="http://nufw.net/" target="_blank">NUFW</a> (.Net Users of Fort Wayne). For people that manage small databases with less than a few million records per table, there are few risks and considerations. For those with large or VLDB databases such as ERP/MRP databases with hundreds of millions of records and Terabyte data file sizes, the process becomes more critical and time consuming. That is the situation for which this process was designed.<br />
<div>
<br /></div>
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="355" marginheight="0" marginwidth="0" scrolling="no" src="//www.slideshare.net/slideshow/embed_code/key/s51G9QNKtOd7An" style="border-bottom: #ccc 1px solid; border-left: #ccc 1px solid; border-right: #ccc 1px solid; border-top: #ccc 1px solid; margin-bottom: 5px; max-width: 100%;" width="425"> </iframe>
<br />
<div style="margin-bottom: 5px;">
<strong><a href="https://www.slideshare.net/DeanWillson/index-reorganization-and-rebuilding-for-success" target="_blank" title="Index Reorganization and Rebuilding for Success">Index Reorganization and Rebuilding for Success</a> </strong>from <strong><a href="https://www.slideshare.net/DeanWillson" target="_blank">Dean Willson</a></strong> </div>
Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com1tag:blogger.com,1999:blog-6008281045932405718.post-42397506878262269542014-05-21T09:04:00.001-04:002014-05-21T09:06:01.761-04:00Powershell IDE’s<p>There are a number of free Powershell Development environments out there. So far, my favorite is Dell’s (formerly Quest Software’s) PowerGui. My current IDE of choice is Idera’s Powershell Plus. There are a few things I still use Microsoft’s native Powershell ISE for, but it doesn’t have all the features I am accustomed to from the other IDE’s. A few of my observations are summarized below, but since they are all free tools, I am appreciative of the value they provide.</p> <h4>Windows Powershell ISE</h4> <p>I like that it has the screen wipe button to clear the console, but since I work more in PowerGUI and Powershell Plus, I am now accustomed to putting a CLS command at the top of my scripts to clear the screen between executions. </p> <p>There is an x86 version and x64 version which makes working with older 32bit dll’s like the <a href="http://dean-o.blogspot.com/search/label/SAP%20Infoview" target="_blank">SAP Business Objects 3.1</a> .Net API’s easy. </p> <p>In the versions I used there didn’t appear to be much if at all in terms of Intellisense (code completion options). Because I switch between editors for VB.Net, C#, Powershell, and SQL Server, Intellisense is a desirable feature to improve productivity.</p> <h4>Powershell Plus</h4> <p>It took me a while to find all the options to set up the environment the way I like it (more like the default PowerGUI interface). It has more bells and whistles than PowerGUI, but most of the time I don’t really need all that. Mainly I just want the code window, console output window, and the variables list. </p> <p>I do like the debugging functionality which automatically steps one line at a time through the code pausing briefly so you can see what line it is currently executing. </p> <p>I don’t like how the comment/uncomment works. It uses a paragraph style comment block vs. commenting individual lines which means I can’t selectively uncomment only a few lines in the bulk paragraph block. Also I can’t uncomment the whole block unless I select exactly the correct selection.</p> <p>There are more options for Executing the scripts, but that seems to take more clicks to Execute in the manner I want to use while testing.</p> <p>I am still relatively new to Powershell Plus so my productivity will improve as I become more familiar with its IDE design.</p> <h4>PowerGUI</h4> <p>This is my favorite, but my issue with it is it doesn’t appear they are actively developing it since Dell acquired it from Quest Software. It hasn’t had an update in a few months and the version I have installed won’t uninstall and I can’t install the newest release without error. The Intellisense is pretty good. </p> <p>I like how the comment/uncomment functionality works. It works like Visual Studio and SQL Server where it will comment or uncomment exactly which lines are highlighted, even if only a part of the line is highlighted.</p> <p>When typing a file path, the GUI makes it easy to click on the path and finish completing the path by navigating the folder structure with a Windows Explorer Browse like functionality.</p> <p>I like the options for Execute All and Execute selection. There are buttons for them right on the top menu as well as the right click menu.</p> <h4>Links</h4> <p><a href="http://en.community.dell.com/techcenter/powergui/m/" target="_blank">Dell PowerGUI</a></p> <p><a href="http://www.idera.com/productssolutions/freetools/powershellplus" target="_blank">Idera Powershell Plus</a></p> <p><a href="http://technet.microsoft.com/en-us/library/dd315244.aspx" target="_blank">Windows Powershell ISE</a></p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com2tag:blogger.com,1999:blog-6008281045932405718.post-17270273620674937842014-04-16T09:03:00.001-04:002014-04-16T09:03:41.450-04:00SQL Server Daily Health Check page and Powershell script update<p>I recently created a new page for my <a href="http://dean-o.blogspot.com/p/sql-health-checks-powershell.html">SQL Server Daily Health Check</a> Powershell script download and documentation. I updated the script to version v0.8.2 which refactored the original script into a function to eliminate repeating code and make it easier to customize with additional checks. I will add additional documentation and instructions as I get time.</p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-91137335056842030522014-02-12T13:48:00.001-05:002014-04-30T08:41:43.812-04:00Stop Main Page from Scrolling on iPad within Scrolling ModalPopup<p>Using ASP.Net ModalPopupExtenders can improve the user experience, but sometimes introduce some annoying side effects on a Mobile device. On a Mobile device like an iPad, if you have a ModalPopup that has more content than fits the screen, it can require having a scrollbar within the popup. If the main page is also too long for the screen, the main page can have a scroll bar also. The user experience degrades when on an iPad, the user is scrolling down the popup content and they reach the bottom of the popup, continued swiping up to scroll down will then start scrolling the main page down. If the user wants to scroll back up within the popup, they must repeatedly swipe down to first scroll the main page up until the top of the main page is reached at which point the popup content will start scrolling up. </p> <p>There are a number of search results that “remove the scrollbar” from the main page while the modal popup is open by setting the html and body CSS tags to overflow:hidden, but many mobile devices don’t respect overflow:hidden alone. I found it was also necessary to set position:fixed also. When the popup is closed reset the position to static or inherit and set overflow to auto. I used jQuery to change the CSS tags to hide and show the main page scroll bars.</p> <p>In my example, I had a div tag with id=”wrapper” in the Master Page surrounding the main page content. I had a ModalPopup window in the WebForm containing a Label (blank text) with a CssClass=”promoVisible” and an OK button with the CssClass=”popupOk”. On the WebForm with the Modal Popup, I used the following jQuery that does all the magic.</p> <div class="csharpcode"> <pre class="alt">$(document).ready(<span class="kwrd">function</span> () {</pre><br /><br /> <pre><span class="rem">//had to set position:fixed to work on iPad and other mobile </span></pre><br /><br /> <pre class="alt"> $(<span class="str">'.popupOk'</span>).click( <span class="kwrd">function</span>(){</pre><br /><br /> <pre> $(<span class="str">'#wrapper'</span>).css(<span class="str">'overflow'</span>, <span class="str">'auto'</span>);</pre><br /><br /> <pre class="alt"> $(<span class="str">'#wrapper'</span>).css(<span class="str">'position'</span>, <span class="str">'inherit'</span>);</pre><br /><br /> <pre> <span class="rem">// alert("ok clicked");</span></pre><br /><br /> <pre class="alt"> });</pre><br /><br /> <pre> <span class="rem">// if the popup is visible, fix the overflow so the</span></pre><br /><br /> <pre class="alt"> <span class="rem">// background doesn't scroll, only the popup window</span></pre><br /><br /> <pre> <span class="kwrd">if</span>($(<span class="str">'.promoVisible'</span>).<span class="kwrd">is</span>(<span class="str">':visible'</span>)){</pre><br /><br /> <pre class="alt"> $(<span class="str">'#wrapper'</span>).css(<span class="str">'overflow'</span>, <span class="str">'hidden'</span>);</pre><br /><br /> <pre> $(<span class="str">'#wrapper'</span>).css(<span class="str">'position'</span>, <span class="str">'fixed'</span>);</pre><br /><br /> <pre class="alt"> } <span class="kwrd">else</span>{</pre><br /><br /> <pre> $(<span class="str">'#wrapper'</span>).css(<span class="str">'overflow'</span>, <span class="str">'auto'</span>);</pre><br /><br /> <pre class="alt"> $(<span class="str">'#wrapper'</span>).css(<span class="str">'position'</span>, <span class="str">'inherit'</span>);</pre><br /><br /> <pre> }</pre><br /><br /> <pre class="alt">)};</pre><br /></div><br /><style type="text/css"><br />.csharpcode, .csharpcode pre<br />{<br /> font-size: small;<br /> color: black;<br /> font-family: consolas, "Courier New", courier, monospace;<br /> background-color: #ffffff;<br /> /*white-space: pre;*/<br />}<br />.csharpcode pre { margin: 0em; }<br />.csharpcode .rem { color: #008000; }<br />.csharpcode .kwrd { color: #0000ff; }<br />.csharpcode .str { color: #006080; }<br />.csharpcode .op { color: #0000c0; }<br />.csharpcode .preproc { color: #cc6633; }<br />.csharpcode .asp { background-color: #ffff00; }<br />.csharpcode .html { color: #800000; }<br />.csharpcode .attr { color: #ff0000; }<br />.csharpcode .alt <br />{<br /> background-color: #f4f4f4;<br /> width: 100%;<br /> margin: 0em;<br />}<br />.csharpcode .lnum { color: #606060; }</style><br /><br /><pre> </pre> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com2tag:blogger.com,1999:blog-6008281045932405718.post-4322836974863238612013-10-23T08:34:00.001-04:002013-10-28T08:17:12.764-04:00Automating SQL Server Daily Health Checks with PowerShell<p>Last night I presented this <a href="http://deanwillson.com/downloads/Automating-SQL-Server-Daily-Health-Checks.zip" target="_blank">PowerPoint presentation and Powershell script</a> Demo to <a href="http://fwpass.org" target="_blank">fwPASS</a> members.</p> <iframe style="margin-bottom: 5px; border-top: #ccc 1px solid; border-right: #ccc 1px solid; border-bottom: #ccc 0px solid; border-left: #ccc 1px solid" height="291" marginheight="0" src="http://www.slideshare.net/slideshow/embed_code/27489291?rel=0" frameborder="0" width="342" marginwidth="0" scrolling="no" allowfullscreen="allowfullscreen"> </iframe> <div style="margin-bottom: 5px"><strong><a title="Automating sql server daily health checks" href="https://www.slideshare.net/DeanWillson/automating-sqlserverdailyhealthchecks" target="_blank">Automating sql server daily health checks</a> </strong>from <strong><a href="http://www.slideshare.net/DeanWillson" target="_blank">Dean Willson</a></strong> </div> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-19733345512338285782013-04-07T16:41:00.001-04:002013-04-08T12:48:28.111-04:00Publish Documents to SAP Infoview using Powershell<p>SAP offers reasonable guidance for creating and publishing the various reports (Webi, pdf, Excel, Crystal Reports) using custom web or windows applications that consume their SAP .Net Development SDK. </p> <p>Using those tools one can create user friendly applications for managing reports in Infoview, but in some cases you may need an easily customizable process for automating some of those tasks. System administrators everywhere are finding Powershell to be a ideal tool administration and automation.</p> <h4>Prerequisites/Assumptions</h4> <ul> <li>SAP Business Objects 3.1 (BOXI 3.1) </li> <li>User account running Powershell has appropriate permissions to access the fileshare where the source pdf report is located </li> <li>Have account credentials with permissions to read/write files on the Bobj API server </li> <li>32bit Powershell x86 engine </li> <li>Server or PC running the Powershell script has the SAP Business Objects .Net SDK installed </li> </ul> <h4>Powershell script</h4> <pre class="brush: powershell; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;"><font size="1"># -------------------------------------------------<br /># Must use x86 powershell client for BOXI 3.1 dll's<br /># -------------------------------------------------<br />[reflection.assembly]::LoadWithPartialName("CrystalDecisions.Enterprise")<br />[reflection.assembly]::LoadWithPartialName("CrystalDecisions.Enterprise.InfoStore")<br />[reflection.assembly]::LoadWithPartialName("CrystalDecisions.Enterprise.Desktop.Pdf")<br />[reflection.assembly]::LoadWithPartialName("CrystalDecisions.Enterprise.Framework")<br /><br />#[CrystalDecisions.Enterprise.SessionMgr] | Get-member <br /><br />$username = "<cmsUsername>"<br />$password = "<cmsPassword>"<br />$cmsname = "<cms-servername>:6400"<br />$cmsAuthType = "secEnterprise"<br />$BOServerName = "<Bobj-servername>"<br /><br />[CrystalDecisions.Enterprise.SessionMgr]$boSessionMgr = New-Object CrystalDecisions.Enterprise.SessionMgr<br />[CrystalDecisions.Enterprise.EnterpriseSession]$boEnterpriseSession = $boSessionMgr.Logon($username, $password, $cmsname, $cmsAuthType)<br />[CrystalDecisions.Enterprise.EnterpriseService]$boEnterpriseService = $boEnterpriseSession.GetService("", "Infostore")<br /><br />$boInfoStore = New-object CrystalDecisions.Enterprise.InfoStore($boEnterpriseService)<br />$myInfoObjects = $boInfoStore.NewInfoObjectCollection()<br />$myPluginManager = $boInfoStore.PluginManager<br />$myPluginInfo = $myPluginManager.GetPluginInfo("CrystalEnterprise.PDF")<br /><br />$myInfoObject = $myInfoObject = $myInfoObjects.Add($myPluginInfo)<br />$myPDF = [CrystalDecisions.Enterprise.Desktop.Pdf]$myInfoObject <br />$myPDF.Title = "DeanPowershelling"<br />$myPDF.Properties.Add("SI_PARENTID", "4701")<br />$myPDF.Description = "Dean is testing uploading to Infoview with Powershell"<br />$myPDF.Files.Add("C:\Development\sapmnt\Reporting\Report-to-be-published.PDF")<br /><br />$boInfoStore.Commit($myInfoObjects)<br /><br /># clean up<br />$boEnterpriseSession.Logoff()<br />$boEnterpriseSession.Dispose()<br />$boSessionMgr.Dispose()<br />$boInfoStore.Dispose()</font></pre><br /><br /><p>The example above is written for Pdf files, but the syntax for the other document types is very similar. Since this is Powershell, it would be a relatively simple task to convert the above to a Powershell Function that could be used by piping the results of some automation to the function to upload a collection of reports at a time, vs. the one-off approach above.</p><br /><br /><h4>Troubleshooting</h4><br /><br /><p>I initially assumed that because I had BusinessObjects installed on my development environment where I was testing, that I had the appropriate dll’s in the GAC to instantiate the BO objects in Powershell. That lead me down a rabbit hole of troubleshooting where I had difficulty determining if the issues I was having were related to the syntax I was trying to use in Powershell or the lack of the necessary BO assemblies.</p><br /><br /><p>I experimented with a combination of copying the dll’s from a working .Net web application to a local folder and using the Powershell <font face="Courier New">Add-Type –path</font> syntax to load the assemblies. I used Telerik JustDecompile to browse the SAP .Net SDK assemblies to make sure I wasn’t missing assemblies.</p><br /><br /><p>I downloaded and installed the SAP BusinessObjects .Net Development SDK’s. Some time during the troubleshooting I was successfully using the Powershell <font face="Courier New">Add-Type –AssemblyName</font> syntax, but I must have had the assemblies loaded from previous debugging attempts because after a restart of the development box, the script using <font face="Courier New">Add-Type –AssemblyName</font> to load the assemblies was failing to recognize the CrystalDecisions.Enterprise.SessionMgr which is actually a part of CrystalDecision.Enterprise.Framework which I was not loading in the PS1 script prior to the restart. The <font face="Courier New">[reflection.assembly]:LoadWithPartialName</font> was working with the above referenced assemblies even after a restart.</p><br /><br /><p>In order to step though and make sure my assemblies were referenced and loaded correctly, I used the above commented out syntax of BO object piped to the Get-Member commandlet <font face="Verdana">to list the methods and properties on the BO objects</font>:</p><br /><br /><pre class="brush: powershell; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;">[CrystalDecisions.Enterprise.SessionMgr] | Get-member </pre><br /><br /><pre class="brush: powershell; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;"><font face="Verdana">If the methods were listed without error, I knew I had the assembly references correct and the assemblies were loaded.</font></pre><br /><br /><pre class="brush: powershell; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;"><font face="Verdana">This is important enough to repeat, make sure if you are using the BOXI 3.1 SDK assemblies, you use an x86 32-bit Powershell engine. </font></pre><br /><br /><p><em>Disclaimer: Make sure all interface with your SAP platform services is in compliance with your applicable SAP license agreements.</em></p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-70026181026449875202013-04-07T15:36:00.001-04:002013-04-07T15:36:52.427-04:00Visual Studio Productivity Tools<p>This is the shell of a presentation I created to highlight some Visual Studio extensions that I have found helpful for improving my coding productivity in Visual Studio 2012.</p> <p>The extensions can be downloaded from NUGET using Tools – Extensions and Updates – Online – Visual Studio Gallery:</p> <ul> <li>Productivity Power Tools 2012<em> by Microsoft</em></li> <li>Web Essentials 2012 <em>by Mads Kristensen</em></li> </ul> <iframe style="margin-bottom: 5px; border-top: #ccc 1px solid; border-right: #ccc 1px solid; border-bottom: #ccc 0px solid; border-left: #ccc 1px solid" height="356" marginheight="0" src="http://www.slideshare.net/slideshow/embed_code/18364138?rel=0" frameborder="0" width="427" marginwidth="0" scrolling="no" mozallowfullscreen="mozallowfullscreen" webkitallowfullscreen="webkitallowfullscreen" allowfullscreen="allowfullscreen"> </iframe> <div style="margin-bottom: 5px"><strong><a title="Visual Studio 2012 Productivity Tools" href="http://www.slideshare.net/DeanWillson/visual-studio-2012-features" target="_blank">Visual Studio 2012 Productivity Tools</a> </strong>from <strong><a href="http://www.slideshare.net/DeanWillson" target="_blank">Dean Willson</a></strong> </div> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-35591711843473092092013-04-07T15:18:00.001-04:002013-04-07T15:18:14.880-04:00Introduction to Powershell presentation<p>Powershell is a powerful scripting shell to do any number of administrative tasks. Below is the introductory level presentation I gave to <a href="http://fwpass.org" target="_blank">fwPASS</a>, the Fort Wayne chapter of the <a href="http://sqlpass.org" target="_blank">Professional Association for SQL Server</a> on 10/23/2012.</p> <iframe style="margin-bottom: 5px; border-top: #ccc 1px solid; border-right: #ccc 1px solid; border-bottom: #ccc 0px solid; border-left: #ccc 1px solid" height="356" marginheight="0" src="http://www.slideshare.net/slideshow/embed_code/14865414?rel=0" frameborder="0" width="427" marginwidth="0" scrolling="no" mozallowfullscreen="mozallowfullscreen" webkitallowfullscreen="webkitallowfullscreen" allowfullscreen="allowfullscreen"> </iframe> <div style="margin-bottom: 5px"><strong><a title="Intro to Powershell" href="http://www.slideshare.net/DeanWillson/intro-to-powershell-14865414" target="_blank">Intro to Powershell</a> </strong>from <strong><a href="http://www.slideshare.net/DeanWillson" target="_blank">Dean Willson</a></strong> </div> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-64753184103763600952012-06-20T20:07:00.001-04:002012-06-20T20:07:09.602-04:00Hyper-V Manager cannot connect–make sure RPC service is running<p>My Hyper-V Server 2008R2 lab environment is so stable I rarely fire up the Hyper-V MMC snap-in. The last time I opened it was four months ago when I switched from booting it from a USB stick to booting it from an IDE drive. I opened it today and it gave me the typical “<font face="Courier New">Cannot connect to the RPC service on computer 'Servername'. Make sure your RPC service is running.</font>” error. My quick troubleshooting steps follow:</p> <ol> <li>I double checked to make sure the IP address and host name were still specified in the \etc\hosts file. It was.</li> <li>I attempted to remote into the Hyper-V server directly using Remote Desktop and was met with the “Your password has expired” message. I reset the password, and voila – the Hyper-V manager MMC connected to my server and displayed the current state of my VM’s.</li> </ol> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com6tag:blogger.com,1999:blog-6008281045932405718.post-83690721566532325102012-06-19T12:21:00.001-04:002012-06-19T12:21:00.746-04:00Blank Page when Publishing a Silverlight App<p>I just deployed a new Silverlight application to a Windows Server 2003 box as a new website and was surprised with a blank page when I launched the application. No error messages or warnings, just a completely blank page.</p> <p>A quick web search and I realized I had been here before. You have to register the MIME types, .xaml and .xap, in IIS for the website. I added them for a previous website, but I didn’t add them at the server root.</p> <p>Simple instructions to add the MIME types to IIS can be found on <a href="http://dev-for-fun.blogspot.com/" target="_blank">Jacqui’s Dev Blog</a> under <a href="http://dev-for-fun.blogspot.com/2007/12/deploying-silverlight-application-why.html" target="_blank">Deploying Silverlight Application - Why Blank?!</a> Note the first blog post comment that suggests adding the additional .xap application/x-silverlight-app and .xbap application/x-ms-xbap MIME types. I didn’t need to add the .xbap to get my application working, but I did need the .xap.</p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com7tag:blogger.com,1999:blog-6008281045932405718.post-26888826585782755632012-06-06T10:18:00.001-04:002012-06-06T10:19:54.187-04:00Visual Studio Project – unavailable<p><a href="http://www.flickr.com/photos/rufino_uribe/354103483/" target="_blank"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="one broken pencil tip in a set" border="0" alt="one broken pencil tip in a set" align="right" src="http://lh6.ggpht.com/-NOBjiMP5how/T89mtaRxl1I/AAAAAAAAAhk/fYTLMfwBuhs/354103483_63240ea13b_m-colored-pencils%25255B4%25255D.jpg?imgmax=800" width="204" height="154" /></a>I hadn’t opened a particular Visual Studio solution since getting a replacement workstation and rebuilding my developer environment. Upon opening, one of the projects in the solution would not open and showed up as “(unavailable)” as shown below. </p> <p><a href="http://lh4.ggpht.com/-sL79CGjxsNo/T89mtrX6VkI/AAAAAAAAAho/PEczTnv3ek8/s1600-h/vs2010-project-unavailable%25255B2%25255D.jpg"><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="vs 2010 project (unavailable)" border="0" alt="vs 2010 project (unavailable)" src="http://lh4.ggpht.com/-jOCJPFL6Izw/T89mtwv9pII/AAAAAAAAAh0/LECLSqP8deU/vs2010-project-unavailable_thumb.jpg?imgmax=800" width="244" height="82" /></a></p> <p>The Output window displayed the not very useful message, “<font face="Courier New">The project type is not supported by this installation</font>.”</p> <p><a href="http://lh6.ggpht.com/-vdLOgJwHnVs/T89muZ2VyuI/AAAAAAAAAh8/jGm24UUCt7I/s1600-h/vs2010-not-supported%25255B6%25255D.jpg"><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="project type not supported" border="0" alt="project type not supported" src="http://lh6.ggpht.com/-rR1lRqU34Mc/T89muR0J0yI/AAAAAAAAAiA/KlJ0mWJrrKs/vs2010-not-supported_thumb%25255B4%25255D.jpg?imgmax=800" width="354" height="69" /></a></p> <p>In order to find out why, I opened the LPM.csproj file using Wordpad, <em>not in Visual Studio</em>, and scanned through the properties looking for insight as to why the project was unsupported. It didn’t take long to find the issue. </p> <p>This project was using <a href="http://www.asp.net/mvc/mvc3" target="_blank">MVC 3</a> and the <a href="http://www.microsoft.com/en-us/download/details.aspx?id=26825" target="_blank">Entity Framework 4.1</a> which were not installed on my new workstation. I installed EF 4.1 on my old workstation specifically so I could use the <a href="http://nuget.org/packages/MvcScaffolding" target="_blank">MvcScaffolding</a> NUGET package with an existing database design for a product technology upgrade. See my previous posts detailing some of <a href="http://dean-o.blogspot.com/search?q=MvcScaffolding" target="_blank">my experiences with MvcScaffolding</a> and the <a href="http://dean-o.blogspot.com/search/label/MVC" target="_blank">ASP.NET MVC</a> framework.</p> <p><a href="http://lh6.ggpht.com/-BKQqJ8O49Hs/T89mupvMD_I/AAAAAAAAAiM/hm_9-6MJnrs/s1600-h/missing-EF-4.1%25255B8%25255D.jpg"><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="missing-EF-4.1" border="0" alt="missing-EF-4.1" src="http://lh6.ggpht.com/-dT-OXW5aA3E/T89mvL46scI/AAAAAAAAAiU/_T78SDWrSv4/missing-EF-4.1_thumb%25255B4%25255D.jpg?imgmax=800" width="379" height="292" /></a></p> <p>After installing both ASP.NET MVC 3 and EF 4.1, all the projects in the solution opened as expected. Another small victory!</p> <p> </p> <p>photo credit: <a href="http://www.flickr.com/photos/rufino_uribe/354103483/" target="_blank">ruurmo</a> / <a href="http://creativecommons.org/licenses/by-sa/2.0/deed.en" target="_blank">CC BY-SA 2.0</a></p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-15999862146495979632012-05-29T13:16:00.001-04:002012-05-29T13:16:41.539-04:00Sterling Serialization issue - Object of type 'System.Int32' cannot be converted to type 'System.DateTime'<p><a href="http://www.flickr.com/photos/three_french_hens/2413654372/"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="sterling forks" border="0" alt="sterling forks" align="right" src="http://lh6.ggpht.com/-xJweyUqUN1A/T8UEaQ7b-4I/AAAAAAAAAgk/VmzC-KPSQ-8/2413654372_396bce56b8_m_silver-forks%25255B5%25255D.jpg?imgmax=800" width="164" height="163" /></a>I created a new data model class to store in a <a href="https://sites.google.com/site/sterlingdatabase/" target="_blank">Sterling</a> NoSQL database. On the first and all subsequent attempts to save or retrieve data of this type, I received the error message at the bottom of this post. A number of other people reported similar issues. Apparently it is some type of serialization/deserialization issue. I didn’t find a suggested resolution, but on a whim, moved the AssessmentDate DateTime property from the top of the list of properties in the class to the bottom and that seemed to resolve the issue.</p> <p><a href="http://lh6.ggpht.com/-wN8N9eJLoGY/T8UEbyZdVoI/AAAAAAAAAgo/e57sgr5uAeQ/s1600-h/image%25255B7%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="class definition" border="0" alt="class definition" src="http://lh3.ggpht.com/-cf83PZ7lY-4/T8UEcaKQccI/AAAAAAAAAgw/hLKbb-c2HdA/image_thumb%25255B5%25255D.png?imgmax=800" width="354" height="202" /></a></p> <p><font face="Courier New">Object of type 'System.Int32' cannot be converted to type 'System.DateTime'.</font></p> <p><font face="Courier New">   at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast) <br />   at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr) <br />   at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig) <br />   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) <br />   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) <br />   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) <br />   at Wintellect.Sterling.Serialization.PropertyOrField.<get_Setter>b__0(Object obj, Object prop) <br />   at Wintellect.Sterling.Serialization.SerializationHelper.<>c__DisplayClassd.<_CacheProperties>b__5(Object parent, Object property) <br />   at Wintellect.Sterling.Serialization.SerializationHelper.Load(Type type, Object key, BinaryReader br, CycleCache cache) <br />   at Wintellect.Sterling.Database.BaseDatabaseInstance.Load(Type type, Object key, CycleCache cache) <br />   at Wintellect.Sterling.Database.BaseDatabaseInstance.Load(Type type, Object key) <br />   at Wintellect.Sterling.Database.BaseDatabaseInstance.Load[T,TKey](TKey key) <br />   at Wintellect.Sterling.Keys.TableKey`2.<.ctor>b__0() <br />   at System.Lazy`1.CreateValue() <br />   at System.Lazy`1.LazyInitValue() <br />   at System.Lazy`1.get_Value() <br />   at LeanAssessmentNav.Views.Register.<BindLists>b__6(TableKey`2 a) <br />   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() <br />   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) <br />   at LeanAssessmentNav.Views.Register.BindLists() <br />   at LeanAssessmentNav.Views.Register..ctor()</font></p> <p> </p> <p>photo credit: <a href="http://www.flickr.com/photos/three_french_hens/2413654372/">Le Petit Poulailler</a> / <a href="http://creativecommons.org/licenses/by/2.0/deed.en" target="_blank">CC BY 2.0</a></p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-6714641283999238942012-05-29T11:58:00.001-04:002012-05-29T13:37:04.470-04:00Why isn’t my Sterling database persisting between application loads?<p><a title="Sterling repository (silver bowl)" href="http://www.flickr.com/photos/neildnoland/5489663275/" target="_blank"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Sterling repository (silver bowl)" border="0" alt="Sterling repository (silver bowl)" align="right" src="http://lh6.ggpht.com/-QVNso_Pkp5Q/T8T96gMz7AI/AAAAAAAAAgQ/Gq2rJAXKakY/5489663275_ea174cf98b_m-silver-bowl%25255B3%25255D.jpg?imgmax=800" width="199" height="244" /></a>I’m using <a href="https://sites.google.com/site/sterlingdatabase/" target="_blank">Sterling, a NoSQL database for .Net, Silverlight, and Windows Phone</a>, to persist some data in a Silverlight 4 application. The intent is to persist it using Isolated Storage. It was obvious that the data was temporarily persisting because the stored data was available on multiple different views in the application. The trouble showed up when I stopped debugging and later started debugging again, the application re-launched and none of the previously persisted data was available. </p> <p>Initially I was thinking that using the Visual Studio ASP.Net Development server was not maintaining Isolated Storage between application launches. It was far more simple than that. By default, Sterling uses an in-memory driver. If you want to persist using Isolated storage, you must pass an instance of the IsolatatedStorageDriver as an argument when Registering the Database. Note the difference in the samples below.</p> <h4>In Memory</h4> <p><font face="Courier New">Database = _engine.SterlingDatabase.RegisterDatabase<YourSterlingDatabase>();</font> </p> <h4>Isolated Storage</h4> <p><font face="Courier New">Database = _engine.SterlingDatabase.RegisterDatabase<YourSterlingDatabase>(<em><strong>new Wintellect.Sterling.IsolatedStorage.IsolatedStorageDriver()</strong></em>); </font></p> <p> </p> <p>photo credit: <a href="http://www.flickr.com/photos/neildnoland/5489663275/" target="_blank">Neil Noland</a> / <a href="http://creativecommons.org/licenses/by-sa/2.0/deed.en" target="_blank">CC BY-SA 2.0</a></p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-39616514728982957472012-04-11T10:42:00.001-04:002012-04-11T10:42:09.505-04:00Get Started Using NuGet on Visual Studio 2010<p>You’ve been hearing things about NuGet, but aren’t sure where it is our how to use it. This is a basic instruction on how to get started. </p> <p>Why NuGet? Developer Productivity. It makes it easier to do things like add Asp.Net Ajax or other libraries and utilities to your project without constantly searching the web for the download and installation process. It is great for items you add to your solutions regularly, but don’t always remember the steps because it has been a while since the last time.</p> <h4>NuGet</h4> <ol> <li>Go to <a href="http://nuget.org/" target="_blank">NuGet.org</a> to download and install NuGet, a Visual Studio extension that makes it easier to download and install third party libraries in a Visual Studio project. </li> <li>Restart Visual Studio, if you had it open.</li> <li>Open the project you want to add the utility or library to.</li> <li>Click “Manage NuGet Packages” under the Visual Studio 2010 “Project” menu. <a href="http://lh5.ggpht.com/-DwidK-D0MfI/T4WYOJznMTI/AAAAAAAAAe4/6aEHJPr8xoA/s1600-h/image%25255B2%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/-YPNMBfqy6tg/T4WYPD7PKhI/AAAAAAAAAfA/5CgEmQhLZXU/image_thumb.png?imgmax=800" width="210" height="244" /></a></li> <li>Search for a utility you are interested in, such as “AjaxControlToolkit”, “Modernizr”, or “MvcScaffolding”.</li> <li>Click the “Install” button.</li> </ol> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-83959596044684325432012-03-28T10:56:00.001-04:002012-03-28T11:13:31.542-04:00Uninstalling a Failed SQL Server 2008 Installation<p><a href="http://www.flickr.com/photos/peterhess/2976755407/" target="_blank"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="frustration" border="0" alt="frustration" align="right" src="http://lh5.ggpht.com/-nhAt0MNmphs/T3MmhKYRAvI/AAAAAAAAAeo/fcCPRFDqhEc/2976755407_d865cd672f_m_frustrated%25255B4%25255D.jpg?imgmax=800" width="204" height="137" /></a>Last night at a SQL Server User Group meeting, one of the attendees was describing the trouble he was having uninstalling a failed SQL Server installation. There was some kind of problem that caused it to fail on the database engine installation. That sounded exactly like a problem I had installing SQL Server 2008R2 as a named instance alongside SQL Server 2005 just a few weeks before. </p> <p>My installation was failing because I was attempting to install SQL Server 2008 (not R2) from an actual Microsoft DVD (most of the time I am installing from an MSDN iso download). After much of the installation was complete, a dialog popped up prompted for media containing a path to a SQL Server 2008 R2 executable. I wasn’t trying to install R2, so I’m not sure why the prompt. I ignored the prompt and continued the installation which failed (no surprise there). After the error, I decided I would just uninstall the non-R2 instance and install SQL Server 2008 R2, but the uninstall wizard would not work. </p> <p>For posterity sake, the blog post that I used to uninstall the failed installation was <a href="http://sqlblog.com/blogs/aaron_bertrand/archive/2010/10/25/fun-with-software-uninstalling-sql-server-2008-r2-evaluation-edition.aspx" target="_blank">Fun with software : uninstalling SQL Server 2008 R2 Evaluation Edition</a> by Aaron Bertrand. The article is about uninstalling an eval edition, but it worked for me on an RTM or SP1 copy.</p> <p> </p> <p>photo credit: <a href="http://www.flickr.com/photos/peterhess/2976755407/" target="_blank">peterhess</a> / <a href="http://creativecommons.org/licenses/by/2.0/deed.en" target="_blank">CC BY 2.0</a></p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com1tag:blogger.com,1999:blog-6008281045932405718.post-44556626365648913332012-02-28T09:57:00.001-05:002012-02-28T10:01:40.300-05:00Hyper-V Lab Experiment; Attack of the Snapshots<p><a title="DeLorean time machine" href="http://www.flickr.com/photos/pnoeric/1589796934/" target="_blank"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="DeLorean time machine" border="0" alt="DeLorean time machine" align="right" src="http://lh5.ggpht.com/-lbsHLS-1pRE/T0zrRBhYkmI/AAAAAAAAAeU/2MsrEZI_2h8/1589796934_90a564996c_m_delorean%25255B4%25255D.jpg?imgmax=800" width="244" height="184" /></a>This is a brief chronicle of the effect of re-creating a Virtual Machine from a Virtual Hard Drive that had Snapshots taken and not merged back into the parent image.</p> <h4>Background</h4> <p>In August 2010, I <em>c</em>reated a Hyper-V lab with a Windows 7 development VM and a Server 2008R2 testing VM. The VM hard disks, virtual machines, and snapshots were stored on the SATA hard disk. The <a href="http://dean-o.blogspot.com/2010/08/hyper-v-on-usb-drive.html" target="_blank">Hyper-V Server 2008R2 host was installed on a bootable USB pen drive</a>.</p> <p>Apparently around November 2010 and over the course of 2011 I created a few snapshots of the Windows 7 VM.</p> <h4>Fast forward to a couple weeks ago</h4> <p>My Hyper-V environment lost power and when it restarted the BIOS failed to recognize the Kingston USB pen drive that Hyper-V was booting from. Result: My lab was down. This happened one other time, but after some fiddling with the BIOS, I  was able to get the USB drive to be recognized.</p> <p>In order to prevent this from happening in the future, I replaced the USB pen drive by installing Hyper-V Server 2008R2 on an IDE drive, plugged it into my lab box and booted. I created a new Virtual Machine using the existing Window 7 Virtual Hard Drive and powered up my development VM. Upon a quick glance everything looked fine.</p> <h4>Missing Files and Programs</h4> <p>A few days later while logged into my Dev VM, I noticed several of my files and directories were missing, Microsoft Office wasn’t installed, and SQL Server said the trial had expired. What?!?</p> <p>A quick check of the Windows Event log and there was an entry that Windows was not shut down properly on November 11, <strong>2010</strong>, but was back up and running on Feb 12, <strong>2012</strong>. Suddenly I was missing over a year of development activity; not really.  </p> <h4>Don’t Panic!</h4> <p>November 11, 2010 was the date the first snapshot was taken. All the activity since then was in the snapshot differencing disks (3 files with a .AVHD extension).</p> <p>I had a Windows Image Backup and regular full backups, but instead of restoring from backup, I decided to have a little fun with the Hyper-V management console instead.</p> <p>A little research and I found this <a href="http://www.energizedtech.com/2011/06/hypervi-need-to-merge-my-avhd.html" target="_blank">article about merging differencing disks</a>. It isn’t the best reference you can find because it doesn’t have <a href="http://aymanstechblog.blogspot.com/2012/02/manually-merge-hyper-v-differencing.html" target="_blank">screenshots of the process like this one</a>. I actually backed up the parent VHD and child AVHD files and renamed the AVHD files VHD, but it appears the renaming process is unnecessary. Otherwise after using the Hyper-V management console to merge each of the AVHD files to their parent drives, I powered up the dev VM after merging and everything was back to the state prior to the initial power outage. Success!</p> <h4>Moral of the Story</h4> <p>If you use a Hyper-V snapshot to test a Windows Update or some other configuration change that you want to be able to roll back out of, make sure to merge the snapshot back into the VM. Don’t leave it in a snapshotted state. Especially not with multiple active snapshots. </p> <p>Reference: <a title="http://technet.microsoft.com/en-us/library/ee941134(v=ws.10).aspx" href="http://technet.microsoft.com/en-us/library/ee941134(v=ws.10).aspx" target="_blank">Hyper-V: Avoid using differencing disks on virtual machines that run server workloads in a production environment</a>.</p> <p>photo credit: <a href="DeLorean time machine" target="_blank">pnoeric</a> / <a href="http://creativecommons.org/licenses/by-sa/2.0/deed.en">CC BY-SA 2.0</a></p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-13615574620360119032012-02-16T10:43:00.001-05:002012-02-16T10:43:14.858-05:00Error 2337 Installing SQL Server 2008R2 in Virtual PC 2007<h4>Issue</h4> <p>Last year I was preparing for an <a href="http://fwpass.org" target="_blank">fwPASS</a> presentation on <a href="http://dean-o.blogspot.com/2010/07/introduction-to-ssrs-report-builder.html" target="_blank">Report Viewer 3.0</a> by installing SQL Server 2008R2 in a virtual machine using Virtual PC 2007. I kept getting an error 2337 indicating that the disk may have been corrupt or damaged. I was installing it from a .iso image I downloaded from my MSDN Ultimate subscription. I used the Virtual PC “capture iso image” functionality to mount the iso as a disk. I downloaded another copy of the iso image and repeated the process with the same results. Due to time constraints, I reverted back to SQL Server 2005 and Report Viewer 2.0 for that presentation, highlighting features new to 3.0 using screenshots.</p> <h4>Physical and Hyper-V Success</h4> <p>Since then I have successfully installed SQL Server 2008R2 successfully multiple times on bare metal physical servers and in VM’s using Hyper-V Server 2008. </p> <h4>VPC Still an Issue</h4> <p>Fast forward to this week. I was setting up a development sandbox in a VM. Again I was installing SS2008R2 by mounting the image in VPC 2007 and was faced with the same Error 2337. Seriously? This issue hasn’t been resolved yet? A quick search on the error resulted in this helpful post <a title="http://www.sqlskills.com/BLOGS/BOBB/post/Getting-error-2337-installing-SQL-Server-on-a-VPC.aspx" href="http://www.sqlskills.com/BLOGS/BOBB/post/Getting-error-2337-installing-SQL-Server-on-a-VPC.aspx" target="_blank">Getting error 2337 installing SQL Server on a VPC</a> on the <a href="http://www.sqlskills.com/" target="_blank">SQL Skills</a> blog. </p> <h4>Solution</h4> <p>I didn’t have any blank DVD’s on hand for burning the image, so I decided I would use MagicDisc to mount the iso file on my host machine, instead of using VPC’s capture iso functionality. That solved the problem.</p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-20944278266770121382011-11-22T16:19:00.001-05:002011-11-22T16:22:49.364-05:00Troubleshooting Relative URI’s in Silverlight Projects<p>My Visual Studio Solution contains a minimum of a project for the Silverlight application and a project for the web page that hosts the Silverlight application. The Silverlight application reads and rights files to the local file system. </p> <p>The solution is structured similar to this:</p> <p><strong>mySolution</strong> (has a minimum of the following two projects)</p> <ul> <li><strong>MyApplication.Web</strong> - the project that hosts the Silverlight xap file (could be a simple index.html page and Silverlight.js javascript page) <li><strong>MyApplication</strong> - the Silverlight application project</li></ul> <p>When debugging in Visual Studio, the files that the Silverlight application is trying to read from are not necessarily available to the application depending on how you structure the application and which project you put the data files into initially.</p> <p>While under development, intuition may lead you to believe that if it is the Silverlight application that is actually reading the files, the Data folder should be placed in the Silverlight application project root, not the web project. That would be incorrect.</p> <h4>Example 1</h4> <div id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">new</span> Uri(<span style="color: #006080">"/Data/ReadThisFile.xml"</span>, UriKind.Relative)</pre><!--CRLF--></div></div><br /><p>UriKind.Relative with a leading slash (/) in front of the Data folder is relative to the page that is hosting the XAP file. In my solution this is the project root of the web application, not the Silverlight project. The data file would be located at f:\mySolution\myApplication.Web\Data\ReadThisFile.xml</p><br /><h4>Example 2</h4><br /><div id="codeSnippetWrapper"><br /><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">new</span> Uri(<span style="color: #006080">"Data/ReadThisFile.xml"</span>, UriKind.Relative)</pre><!--CRLF--></div></div>Without the leading slash in front of the Data folder as in this example, the file is expected to be relative to the Silverlight xap file. In my solution the xap file is in the default location, the ClientBin folder, which is a sub folder of the project root of the web application. The data file in this case would be located at f:\mySolution\myApplication.Web\ClientBin\Data\ReadThisFile.xml <br /><h4></h4><br /><h4>Troubleshooting with Process Monitor</h4><br /><p>If you are getting File not found exceptions, the file isn’t where your application thought it was supposed to be. A relatively easy way to find out where the application is looking for the file is to use <a href="http://technet.microsoft.com/en-us/sysinternals/bb842062" target="_blank">SysInternals</a> <a href="http://technet.microsoft.com/en-us/sysinternals/bb896645" target="_blank">Process Monitor</a>.</p><br /><p>Once you install and run the Process Monitor, you can set the filters to narrow down the captured events to locate the path to the file. The primary filters I used were “Result is not SUCCESS” and “Path contains ReadThisFile.xml”</p><br /><p> <a href="http://lh4.ggpht.com/-SBPnuHk0Qws/TswR09dsE7I/AAAAAAAAAdo/Ooa2wGE4UxA/s1600-h/image%25255B7%25255D.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://lh4.ggpht.com/-uS7RBjEeZR0/TswR1eTmvjI/AAAAAAAAAdw/2sJSW56sXpM/image_thumb%25255B3%25255D.png?imgmax=800" width="372" height="344"></a></p><br /><p>The filtered results would look similar to the following, if the the application throws a File not found type of error. (click to enlarge)</p><br /><p><a href="http://lh4.ggpht.com/-IqOL60ConpA/TswR1kHxvVI/AAAAAAAAAd4/3uNN8_iHfe8/s1600-h/image%25255B11%25255D.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://lh5.ggpht.com/-xy5y3NlWxto/TswR1zvhZsI/AAAAAAAAAeA/doVohUlLRgY/image_thumb%25255B5%25255D.png?imgmax=800" width="416" height="82"></a></p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com4tag:blogger.com,1999:blog-6008281045932405718.post-91678217100158438072011-11-21T10:21:00.001-05:002011-11-21T10:21:14.236-05:00Could not load file or assembly System.IdentityModel<p>I added functionality to a Silverlight application I created several months ago and when I attempted to run it in debug mode, I received this error:</p> <blockquote> <p><font face="Courier New"><font style="font-weight: normal">Could not load file or assembly 'System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.</font></font></p></blockquote> <blockquote> <p><font face="Courier New"><b>Exception Details: </b>System.IO.FileNotFoundException: Could not load file or assembly 'System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.</font></p></blockquote> <p>I found very little evidence of why I was getting this error now. My search results did not turn up much useful information either. I did find this <a href="http://stackoverflow.com/questions/3417257/inexplicable-assembly-load-in-wcf-service-iis-7" target="_blank">link on Stack Overflow</a>, so on a whim I revised the web.config of the web project that hosts the Silverlight application to a add a clear statement to the assemblies node.</p> <div id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><configuration></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <system.web></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <compilation debug=<span style="color: #006080">"true"</span> targetFramework=<span style="color: #006080">"4.0"</span> ></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <assemblies></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <clear/></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> </assemblies></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> </compilation></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> </system.web></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"></configuration></pre><!--CRLF--></div></div><br /><p>After making that change, the assembly loads without errors. This was on my development workstation. The application did not throw any errors on the production server after publishing it without the clear statement in the web.config.</p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-10779539739758608962011-10-26T10:36:00.001-04:002011-10-26T10:38:03.364-04:0010 Reasons to Join a PASS or .Net User Group<p><a href="http://lh3.ggpht.com/-xUZbEOH1MVo/TqgbAwrnPBI/AAAAAAAAAdI/vG7G6jYSkJ4/s1600-h/user-group%25255B3%25255D.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="user group" border="0" alt="user group" align="right" src="http://lh6.ggpht.com/-jJ80uAblVxM/TqgbBBJNWEI/AAAAAAAAAdQ/qsj9enqkMSU/user-group_thumb%25255B1%25255D.jpg?imgmax=800" width="244" height="124"></a>I am a member and leader at multiple chapters of technology-based international professional associations, like <a href="http://sqlpass.org" target="_blank">PASS</a> (Professional Association for SQL Server) and <a href="http://ineta.org" target="_blank">INETA</a>. Through that affiliation, I have experienced many, many benefits that such a small percentage of our industry takes advantage of.</p> <ol> <li>Great people – Attendees, speakers, organizers, volunteers, sponsors, and venue hosts. Attend regularly and I promise you will make life long friends.</li> <li>A place to talk shop with peers, learn about other organizations and practices, scope out job opportunities, help others with their challenges, and mentor people new to the field.</li> <li>Great content – free training, new technology previews, and deep dives into specific topics.</li> <li>Access to experts – speakers almost always provide their contact info and give you permission to ask questions outside of the presentation. Get help on your challenges from other attendees during the social networking time. Sometimes you even get to meet Industry celebrities and national conference presenters, such as <a href="http://brentozar.com" target="_blank">Brent Ozar</a>, <a href="http://www.bradmcgehee.com/" target="_blank">Brad McGehee</a>, and <a href="http://weblogs.asp.net/scottgu/" target="_blank">Scott Guthrie</a>.</li> <li>Food and beverage</li> <li>Free swag – books, software (Development software, Operating Systems, 3rd party tools, Xbox games, and more), hardware (keyboards, mice, web cams, etc.), training vouchers, discount coupons, quirky and unusual items (such as <a href="http://www.getbuckyballs.com/" target="_blank">Bucky Balls</a>), travel mugs, tote bags, back packs, and the list goes on.</li> <li>News and announcements about other events and happenings in the industry – training conferences like the <a href="http://www.sqlpass.org/Events/PASSSummit.aspx" target="_blank">PASS Summit</a> and <a href="http://sqlcruise.com/" target="_blank">SQL Cruise</a>, all day training opportunities, such as <a href="http://dodn.org/" target="_blank">Day of .Net</a>, <a href="http://codemash.org/" target="_blank">Codemash</a>, <a href="http://sqlsaturday.com/" target="_blank">SQL Saturday</a>, virtual training events, contests, free eBooks promotions, Job opportunities.</li> <li>Save money travelling to regional training or events by carpooling with your fellow user group friends.</li> <li>Opportunities to present – show off your own proficiency in your craft, get experience to prepare you to speak on regional or national level, establish credibility as a teacher/communicator.</li> <li>Opportunities to be a board member or volunteer to hone your leadership and logistical skills enhances your career marketability. Also, volunteering or leading a local chapter or regional event is great way to prepare you to become a board member on a national scale, if that is of interest to you.</li></ol> <p>Really there are few reasons <em>not</em> to attend, join, volunteer, or lead a professional organization. If you’re interested in professional organizations in general, read my popular post about <a href="http://practicalhoshin.blogspot.com/2010/02/ten-reasons-to-join-professional.html" target="_blank">10 reasons to join a professional association</a>.</p> <p>What have I missed?</p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-51874907276812025102011-10-13T16:37:00.001-04:002011-10-13T16:39:12.585-04:00SQL Server Compatibility Level Testing<p><a href="http://www.flickr.com/photos/somegeekintn/3252569621/" target="_blank"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="upgrading technology" border="0" alt="upgrading technology" align="right" src="http://lh3.ggpht.com/-ClrvGJFQ4CQ/TpdMEaW6riI/AAAAAAAAAc8/AmsUoNCH3-U/3252569621_2bb45819dc_m-old-portable-pc%25255B3%25255D.jpg?imgmax=800" width="244" height="164"></a>I stumbled on interesting version compatibility issues while working with a database in SQL Server 2008R2. The database was originally developed in SQL Server 2000. It was upgraded to MSSQL 2008R2 as a part of a virtualization initiative, however, the Compatibility Level was still set to 80 (MSSQL 2000).</p> <p>After seeing columns of type VARCHAR(MAX), it got me wondering about compatibility issues since there was no VARCHAR(MAX) in 2000. </p> <h4>Anomaly #1</h4> <p>Doing some research I found this post with a script for <a title="http://www.sqlservercentral.com/scripts/Compatibility/62093/" href="http://www.sqlservercentral.com/scripts/Compatibility/62093/" target="_blank">Testing all procs before upgrading to Compatibility Level 90</a>. I ran it on the database (while still set to Compatibility Level 80) and it reported a stored procedure that had a syntax error that was not caught by the syntax checker in MSSQL 2000, 2005, or 2008R2. The SQL is below:</p> <div id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">SELECT</span> ChangeLogID</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , CourseID</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , RecordID</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , RecordTable</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , ChangeType</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , ModifiedDateTime</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , ModifiedByEmpNo</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , <span style="color: #0000ff">CASE</span> RecordTable </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <span style="color: #0000ff">WHEN</span> <span style="color: #008000">'Course' THEN</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> ( <span style="color: #0000ff">SELECT</span> CourseName </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> FROM Course </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> WHERE CourseID = cl.CourseID)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <span style="color: #0000ff">WHEN</span> <span style="color: #008000">'Lesson' THEN</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> ( <span style="color: #0000ff">SELECT</span> LessonName </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> FROM Lesson </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> WHERE LessonID = cl.LessonID)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <span style="color: #0000ff">WHEN</span> <span style="color: #008000">'Content' THEN</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> ( <span style="color: #0000ff">SELECT</span> ContentName </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> FROM Content </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> WHERE ContentID = cl.ContentID)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <span style="color: #0000ff">ELSE</span> <span style="color: #006080"><font style="background-color: #ffff00">"None"</font></span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <span style="color: #0000ff">END</span> <span style="color: #0000ff">AS</span> RecordName</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">FROM ChangeLog cl</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">WHERE (CourseID = @CourseID)</pre><!--CRLF--></div></div><br /><p>The error message was: <font face="Courier New">Invalid column name 'None'</font>. Note the quotation marks around “None” after the ELSE. Strangely, the stored procedure executes without error. It only detects the syntax error on CREATE, not when I ALTER the stored procedure.</p><br /><h4>Anomaly #2</h4><br /><p>Using the same database described above, the compatibility error detection script I used (while still having a Compatibility Level of 80) did not detect the error: </p><br /><p><font face="Courier New">Msg 8127, Level 16, State 1, Procedure GetNextLessonForLessonNo, Line 49<br>Column "Lesson.LessonNo" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.</font></p><br /><p>The SQL generating this error is:</p><font face="Courier New"><br /><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">SELECT</span> TOP 1 MIN(L.LessonNo) <span style="color: #0000ff">AS</span> LessonNo</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , L.LessonID</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , L.CourseID</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , L.LessonName</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , L.LessonDesc</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , COUNT(Content.ContentID) <span style="color: #0000ff">AS</span> NContentPages</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">FROM Course C </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> INNER JOIN Lesson L </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <span style="color: #0000ff">ON</span> C.CourseID = L.CourseID</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> LEFT OUTER JOIN Content </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <span style="color: #0000ff">ON</span> L.LessonID = Content.LessonID</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">WHERE (L.LessonNo > @LessonNo </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> <span style="color: #0000ff">AND</span> L.CourseID = @CourseID)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">GROUP BY L.LessonID</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , L.CourseID</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , L.LessonName</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> , L.LessonDesc</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">ORDER BY L.LessonNo</pre><!--CRLF--></div><br /><br /><p><font face="Verdana">This error is not detected in SSMS (in a query window, or by running the detection script) until the Database Compatibility Level is changed from 80 (MSSQL 2000) to 100 (MSSQL 2008). The issue can be resolved in SQL Server 2008 by adding L.LessonNo to the GROUP BY clause.</font></p><br /><p>photo credit: <a href="http://www.flickr.com/photos/somegeekintn/3252569621/" target="_blank">somegeekintn</a> / <a href="http://creativecommons.org/licenses/by/2.0/deed.en" target="_blank">CC BY 2.0</a> </p></font> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-10437223623056659222011-09-27T13:07:00.001-04:002011-09-27T13:09:40.164-04:00Image button link options in ASP.Net MVC3<p>There are several ways to skin this cat, but below are a couple options for using an image, in lieu of text, as a link to content. There are other overloads for the Url.Action and the Html.ActionLink, but in this example I was linking to a different controller passing in the integer id of the item to display a list of child records. The "STEPS” image is displayed if the parent record has child records.</p> <p><a href="http://lh6.ggpht.com/-QcF0pDncBf0/ToICx-ywKZI/AAAAAAAAAc0/ylP2A1Xji_o/s1600-h/image%25255B2%25255D.png"><img style="background-image: none; border-right-width: 0px; margin: 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://lh5.ggpht.com/-jucDavVkLgg/ToICybMdnLI/AAAAAAAAAc4/iV_OcKfe8YM/image_thumb.png?imgmax=800" width="244" height="207"></a></p> <h4>Url.Action method</h4> <div id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><a href='@Url.Action(<span style="color: #006080">"ActionName"</span>, <span style="color: #006080">"ControllerName"</span>, <span style="color: #0000ff">new</span> {Id = item.ID}) '><img src='@Url.Content(<span style="color: #006080">"~/Content/Images/buttonimage.gif"</span>) ' alt=<span style="color: #006080">"View Detail"</span> border=<span style="color: #006080">"0"</span> /></a> </pre><!--CRLF--></div></div><br /><h4>Html.ActionLink method</h4><br /><div id="codeSnippetWrapper"><br /><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">@Html.ActionLink(<span style="color: #006080">" "</span>, <span style="color: #006080">"ActionName"</span>, <span style="color: #006080">"ControllerName"</span>, <span style="color: #0000ff">new</span> { Id = item.ID }, <span style="color: #0000ff">new</span> { @<span style="color: #0000ff">class</span> = <span style="color: #006080">"steps-button"</span>, alt = <span style="color: #006080">"View Detail"</span>, title = <span style="color: #006080">"View Detail"</span> })</pre><!--CRLF--></div></div><br /><p>Note that the first parameter in the action link is a space (because I didn’t want any text to show over the button background image) and the first argument cannot be null or empty.</p><br /><p>In the site CSS layout I added the following steps-button class that adds the image to the link as a background image.</p><br /><div id="codeSnippetWrapper"><br /><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">a.steps-button </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">{</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> background: url(../Content/Images/buttonimage.gif) no-repeat top left; </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> width: 14px;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> height: 44px; </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> display: block;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">}</pre><!--CRLF--></div></div> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0tag:blogger.com,1999:blog-6008281045932405718.post-33393190785267470822011-09-14T12:26:00.001-04:002011-09-14T12:30:50.282-04:00Using jQuery datepicker with MVC3 textboxes<p><a href="http://lh6.ggpht.com/-9B-aMUXlzEA/TnDVwFZZa2I/AAAAAAAAAb0/S6_8ZPSLyQ0/s1600-h/3923232492_25892585cc-date-picker%25255B3%25255D.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="Pick a date" border="0" alt="Pick a date" align="right" src="http://lh5.ggpht.com/-w4gxBaxoYfU/TnDVwe9LY6I/AAAAAAAAAb4/KrZ0eQ1nDxg/3923232492_25892585cc-date-picker_thumb%25255B1%25255D.jpg?imgmax=800" width="244" height="139"></a>This post addresses two issues:</p> <ol> <li>Using the built-in ASP.NET Development Server vs. IIS to render the datepicker. If you are using IIS, skip to the second section. <li>Dependencies necessary to get the <a href="http://jqueryui.com/demos/datepicker/" target="_blank">jquery ui datepicker</a> to work in an MVC3 project.</li></ol> <h4>ASP.NET Development Server</h4> <p>I repeatedly have issues with AJAX controls (like the <a href="http://dean-o.blogspot.com/2010/11/ajax-control-toolkit-modal-popup-css.html" target="_blank">ModalPopup</a> control) rendering with the correct styles using the ASP.NET Development Server vs. IIS. The jquery datepicker is no exception, but this time it surfaces as the following error “Microsoft JScript runtime error: Object doesn't support this property or method” in the jquery-1.5.1.min.js, which isn’t very helpful for troubleshooting.</p> <p><a href="http://lh6.ggpht.com/-hfEoMcra1aA/TnDVwmXLPUI/AAAAAAAAAb8/0zPMZ8Zic6I/s1600-h/image%25255B4%25255D.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://lh5.ggpht.com/-llvbljul7pk/TnDVxOgwa-I/AAAAAAAAAcA/CxdVWRLBgs4/image_thumb%25255B2%25255D.png?imgmax=800" width="404" height="133"></a></p> <p>On a hunch, I decided to configure the project as an application in IIS and access it via localhost/appname instead of the dynamically addressed port of the ASP.NET Development Server - giving me a more meaningful error to troubleshoot.</p> <h4>jQuery UI dependencies</h4> <p>Using the IIS served application, I received the tiny warning triangle in the lower left corner of IE that indicates a javascript error, “Message: Object doesn't support this property or method”. The offending line of code was $("#EstDateStarted").datepicker();.</p> <p>My project was based on the standard Visual Studio 2010 MVC3 project template which included only the jquery-1.5.1.min.js in the _Layout.cshtml file using the Razor rendering engine. The .datepicker function is not located in that javascript file it is in the jquery-ui-1.8.11.min.js file. All I needed do to enable that functionality and resolve the error was to add the following reference to the head of the _Layout.cshtml file, which includes it on all the pages of the app:</p> <p><script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></p> <p><a href="http://lh5.ggpht.com/-lAAAxYBx5MY/TnDVxRMDPjI/AAAAAAAAAcE/2AQxke4nABY/s1600-h/image%25255B13%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="jquery ui datepicker" border="0" alt="jquery ui datepicker" src="http://lh4.ggpht.com/-f1kCLcjm_S0/TnDVxi8B_AI/AAAAAAAAAcI/4kerZScKv08/image_thumb%25255B9%25255D.png?imgmax=800" width="258" height="235"></a></p> <p>photo credit: <a href="http://www.flickr.com/photos/qilin/3923232492/" target="_blank">augapfel</a> / <a href="http://creativecommons.org/licenses/by-sa/2.0/deed.en" target="_blank">CC BY-SA 2.0</a></p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com2tag:blogger.com,1999:blog-6008281045932405718.post-86605929433384924322011-07-28T08:11:00.001-04:002011-07-28T08:26:18.566-04:00New App Hub Features Still Need Work<p><a href="http://leanbites.blogspot.com/" target="_blank"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="LeanBites200" border="0" alt="LeanBites200" align="right" src="http://lh4.ggpht.com/-fUrTthvuZKs/TjFS8bM5N3I/AAAAAAAAAbA/tArIfnFg-_0/LeanBites200%25255B4%25255D.png?imgmax=800" width="204" height="204" /></a>The July 18 Marketplace updates look like they still need some tweaking. I updated one of my apps and set the publish status to “hide” after certification. After app certification approval, for  some reason, it showed an update to the app on my phone (doesn’t seem hidden to me). I updated the app to the new version, and the splash screen was updated, but the icons were not updated and the application just showed a “My Application” header at the top of the page with no app content at all.</p> <p>I thought maybe that was the result of the “Hide” status. So I un-hid the app in the marketplace. It didn’t prompt another update so I uninstalled the app from my phone. When I searched in the marketplace for my app to reinstall, it could not be found.</p> <p>In order to reinstall the app, I had to navigate to my <a href="http://leanbites.blogspot.com/" target="_blank">Lean Bites website</a> on my phone and click the <a href="http://social.zune.net/External/LaunchZuneProtocol.aspx?pathuri=navigate%3FphoneAppID%3D010533eb-207f-e011-986b-78e7d1fa76f8" target="_blank">Zune Marketplace deep link</a> in the right column of the website. After following that procedure, the app installed and is working correctly again with the new updated version.</p> <p>I hope Microsoft gets these issues worked out before the consumer frustration gets to a new high and it doesn’t make my app look like it’s the problem. With so much riding on the new Windows Phone platform, it is unfortunate to see them stumbling over issues that probably should have surfaced in beta testing.</p> Dean Willsonhttp://www.blogger.com/profile/12159153218021214633noreply@blogger.com0