Mark's Stuff

My Foray Into Weblogging. Using this to store interesting items for later review.

Saturday, August 28, 2010

This blog has moved


This blog is now located at http://markblog.harr.us/.
You will be automatically redirected in 30 seconds, or you may click here.

For feed subscribers, please update your feed subscriptions to
http://markblog.harr.us/feeds/posts/default.

Thursday, December 03, 2009

"Three screens and the cloud"

Interesting blog article from Keith Elder about information from PDC 2009:

.Net 4.0 - Start Reading Between the Lines ? Learn Silverlight and Entity Framework



Here's a quote: "Three screens and the cloud"

We heard this over and over at PDC. Let's read between the lines a bit shall we?

I have three screens: Windows Desktop, Web, Mobile. Ok, if I want to write an app that will run on all three what do I as a developer have to do today? Let?s see, well, we could write a ClickOnce deployed Smart Client for the Desktop that uses WPF. For the web, well, we would have to switch gears completely and rewrite our app in Asp.Net or Asp.Net MVC to get that screen. For mobile, even tougher, we have to rewrite the app again to get the mobile version. Let?s think about this differently again. Think about it, how many technologies would a developer have to know in order to an application for these three different screens; WPF, JavaScript, HTML, and CSS will be used just to name a few.

Now, let's switch gears. What if I used Silverlight 4 to write my app? Well, it could work in the browser no doubt. Hmmm, it could also work on the Desktop using the out of browser experience with elevated permissions. What about mobile?

"Wait, didn?t you just say Keith that at Mix we?ll get to see Windows Mobile 7?"

Yes!

"And hasn't there already been talk of using Silverlight for mobile?"

Yes!

"Aha! Three screens with Silverlight, I get it!"

That's right my friendly .Net developers the writing is on the wall. The vision of WPF/e (WPF Everywhere) is about to come true. We've waited for years but it is just around the corner as I predicted would happen years ago.

Labels: , , , ,

Monday, October 26, 2009

SQL Server AWE

Ran across this problem running SQL Server 2005 Ent edition on Windows Server 2003 64-bit with 8gb memory. Even turning on AWE, it still would only use 3gb memory.

Turns out problem is that the account that SQL Server was running under does not have permissions to lock pages in memory.




  1. Run gpedit.msc. On the left hand pane, expand Computer Configuration, expand Windows Settings, expand Security Settings, expand Local Policies, select User Rights Assignment

  2. On the right hand pane, find Lock pages in memory and double click, then add your Sql Server startup account into Local Security Policy Setting tab;

  3. In Sql Server Management Studio, run:
    sp_configure ?show advanced?, 1

    reconfigure

    sp_configure ?awe enabled?, 1

    reconfigure
    Ignore the error message below, if you have it.
    Msg 5845, Level 16, State 1, Line 1

    Address Windowing Extensions (AWE) requires
    the ?lock pages in memory? privilege which is
    not currently present in the access token of
    the process.

  4. Reboot.
Updated 10/26/2009:
While looking up this post for helping an friend with the same problem, I noticed that this now works for Standard edition as well as Enterprise edition. You need Cumulative Update package 2 for SQL Server 2008 Service Pack 1 or Cumulative Update package 4 for SQL Server 2005 Service Pack 3 to provide support for Locked Pages in Standard edition.
http://blogs.msdn.com/psssql/archive/2009/05/19/an-update-for-standard-sku-support-for-locked-pages.aspx



Labels:

Monday, September 21, 2009

Fixing Error 1603 on MSI installs

For some reason that I have not been able to figure out yet, I have been having problems with some software installations failing on my Windows 7 system with a message like this (or similar to this):

image

In this case, it was installing Intellipoint, but I had the problem with installing Mozy Backup client, VirtualBox, and a couple other apps that I don't remember right now.  I was able to fix each of these installations individually, and will describe it here (so that I can find it again when I need it).  But this does not seem to be a widespread problem, and I am still not sure why my system does this and not (many) others.

I used the instructions on John McBride's blog (Virtual Box 3 and Windows 7 (Making it work!)), with a couple of additional items relating to logging the install and finding the msi installation package.

  1. First, we need to see the log to see what caused the 1603 error above.  By default, any system does not keep the installation logs or the installer files when it fails.  So first we need to have Windows Installer log its steps so the we can see what caused the error.  Using instructions from MS Support (How to enable Windows Installer logging) I edit the registry with the following entry:

    REGEDIT4
    [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer]
    "Logging"="voicewarmup"

    Or you can save this to a file and dbl-click it to install it in your registry.  This will create a log file in your temp directory for each installation using Windows installer. 
  2. So now run your install that will fail again.  Don't answer the error message yet!  When you answer, it will clean up the installation files and you may want to grab those files first.

    Did you start the installation by running an .msi file?  Then that is good, you have the file that you need to possibly fix.  But it is likely you started using an .exe file, and it is a compressed self-extracting file, the .msi is packed in that file with other files for the setup process.  We want the files that were extracted.

    Go to your Temp directory to open the log file.  (Tip: at least in Vista and Win7, you can easily get to your Temp directory by clicking Start button and typing "%Temp%" without the dbl-quotes; hit enter and you're there.)  The log file will be named Msi*.log, and probably the most current file is the one you are after.  Open it in your favorite text editor.

    In the log file, within the first 20 lines or so, it will tell you where the temp directory that the files were extracted.  In this case, it's a line like this:

    Package we're running from ==> C:\Users\Mark\AppData\Local\Temp\msiB374.tmp\mozy.msi

    This shows our installation files are in C:\Users\Mark\AppData\Local\Temp\msiB374.tmp\, so go there are copy the directory to another directory so you have copies of the files to work with.

    Now you can answer the error message and let the installation clean up after itself. 
  3. (The rest of this is from John McBride's blog (Virtual Box 3 and Windows 7 (Making it work!)).)
    You will need Orca MSI Editor from the Platform SDK installation ( I used Windows 7 Platform SDK).  For these particular errors, it a problem with the DIFXAPP drivers in the installation package.  I got updated files DIFxApp.dll and DIFxAppA.dll from the Windows Driver Kit for Windows 7 and Windows Server 2008 (from MSDN Downloads).
  4. Open the MSI file in Orca MSI Editor.  Select the Binary table on the left.  You should see the 2 dll's listed on the right.
    image
  5. Delete each of these rows: right-click on the row and select "Drop Row".
  6. Right click in empty area on the right side and select "Add Row".  Navigate to the location of the updated drivers from the Drivers Library (C:\WinDDK\7100.0.0\redist\DIFx\DIFxApp\WixLib\x86).  Add both the DIFxApp.dll and DIFxAppA.dll files, making sure the row name is the same as the DLL file name.
  7. Save the MSI file.
  8. Install.

That's it.  Each of the 4 installations worked for me then.

Labels: , ,

Tuesday, August 18, 2009

IE6 Retirement Schedule Is OK by me

There has been some uproar about an article that Microsoft will still support IE6 until 2014 (ref: http://twitter.com/JimHolmes/statuses/3388282884, and RT dozens of times.)

I'm sorry, but I cannot get upset about this news article.  Back in the 90's, we whined and complained that Microsoft (and other vendors) were coming out too fast with software releases, and not supporting releases long enough. Remember that VB 2.0 was only out 6 months before VB 3.0 came out.  And MS Word 98 was replaced by Office 2000 only 8 months after its release.  Microsoft heard and understood, and came out with their Lifecycle Support policy so that we could have some semblance of scheduled lifetime for software releases.

And now we want to whine that Microsoft is following that policy?  I'm sorry, but I'm not going to follow that.  We cannot complain because there wasn't a planned policy, then complain that we don't like the standard policy.  No, Microsoft is OK on this one.

Now, I fully agree that we should not be using IE6.  We need to get users to safer and better platforms, and get them on IE8 whenever possible.  And the sooner the better, especially for relieving our web site development headaches.  The faster the market share for IE6 approaches zero will be good for all of us. 

But as long as there are users using IE6, for whatever reason, I want Microsoft to support it.  I want critical security patches and fixes dealt with and deployed as quickly as possible, and any performance enhancements or rendering fixes continued to be developed. 

And as long there are significant share of our users still using IE6 (20% of total IE population, that I last heard of), we as developers still need to account for those users and make sure our sites don't leave them out.  We develop software for our businesses, and for our business's customers, not for our standards of elegance.  We need to continue to support or users and customers, not ridicule or demean them.

Labels: , ,

Friday, July 31, 2009

Windows Anytime Upgrade and Family Pack Pricing

Microsoft announces Windows 7 Family pack pricing and Anytime upgrade pricing.

$149 for 3 family Home Premium licenses is pretty good, especially considering that 1 Home Premium license is $199. Or is the 3 licenses only for upgrades? Not sure, I've posted the question to the Windows team blog post.

Windows Anytime Upgrade and Family Pack Pricing - Windows 7 Team Blog - The Windows Blog

Updated 8/1: Family Pack is upgrade license only. Raelize that you will only be able to upgrade from Vista SP1 or XP SP3, and it must be currently activated.

Labels:

Monday, July 06, 2009

I'm A VB!

 

I'm A VB: Mark Harr

My profile was just accepted on the Microsoft Visual Basic Team's "I'm a VB" campaign. 

Labels: , ,

Wednesday, June 24, 2009

Tip: Get the name of the calling method

Very handy for using common logging or exception handling routines.

This code is corrected from original article, and added to also get the calling function.

using System.Diagnostics;

void Log(string eventMessage)
{

   Console.WriteLine("Event logged by " + (new StackTrace().GetFrame(1).GetMethod().Name);
Console.WriteLine("Module: " + (new StackTrace().GetFrame(1).GetMethod().Module.Name)



   Console.WriteLine("Event: " + eventMessage);

}



Tips & Tricks for ASP.NET, IIS, and Visual Web Developer : Tip #83: Did you know... You can get the name of the calling method from the stack using reflection?

Labels: ,

Wednesday, June 17, 2009

ADO.NET team: System.Data.OracleClient Deprecated

Microsoft ADO.Net team (Himanshu Vasishth, Program Manager) announces that the ADO.Net Oracle provider will no longer be supplied by Microsoft.  Recommended to use 3rd party provider.

ADO.NET team blog : System.Data.OracleClient Update

Possible alternatives are:

Labels:

Monday, June 15, 2009

Interesting problem: IIS file download = 0 bytes

I ran into an interesting problem at a client site the other day.  Another developer group had written and installed a ASP.Net application (Visual Studio 2008, .Net Framework 3.5 SP1, Windows Server 2003 R2, SQL Server 2005).  Without divulging too many details, let's just say the application had a public site where users could upload a file, and an internal admin site where the internal user could download the file.  The file is being stored in the database in a varbinary(max) column.

After the sites were installed, the internal user had a problem downloading the file; it always came back as 0 bytes.  It did not matter the file type (pdfs and word docs were used), browser type (same for IE6 (standard for company), IE7, IE8, Firefox 3.x, Chrome, Opera , Safari on Windows).  The file was definitely in the database, and the original developer wrote a Windows desktop app to download the file as a temporary workaround.  The original developer swore the file download it worked just fine on their servers, and brought in a more experienced consultant to try to help diagnose the problem.  I was at this client site on another project, and was asked to take a look to see if I could spot anything.

After a few false starts doing some troubleshooting (the original developer said the VS project was a web site project, and had the code-behind files in the web directory, so we would modify the .cs file to try to track the problem, but had no results; turns out it was a web application project, and we were not recompiling the project), we did confirm the byte array from the database field was being populated.  The code was using Response.BinaryWrite, and seemed to be setting the proper headers and sending the data.  We look at the IIS web site settings over and over, trying to find some clue. 

The server the web application was installed on did have other live applications running, so our debugging the production server was limited so as to not affect the other apps. Our next attempt was to setup another Windows IIS server (virtual, on MS Virtual Server) and install the web site app on there.  The file download worked just fine there.  So it appears that the application is OK, it must be an IIS setting causing the problem.  Now that we had a server we knew it worked on, I took the metabase.xml files from both servers and worked to compare them.

That was when I saw the problem: HTTP Compression was turned on the first server.  We had missed it on the IIS Settings because that (the "Service" tab) is only on the property dialog for the Web Sites folder, not on the web sites themselves, and not on the server settings.  Here is the dialog window:

clip_image002

Turning that off did solve the download file problem, but the client was uneasy about turning it off (understandably) since it was likely turned as part of the other applications that was running on that server, and they did not want to risk that apps.

Although I knew it would not affect the other apps to turn off HTTP compression, I looked further into it and saw that HTTP compression can be turned on or off for the entire server, by web site, by directory, by file type, or by individual page, all by using adsutil commands.  I also found a .cmd file in the AdminScript directory of the server turning on HTTP compression, so I modified it to turn off compression for the web site:

CSCRIPT.EXE ADSUTIL.VBS SET W3SVC/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "pdf" "aspx" "svc"
CSCRIPT.EXE ADSUTIL.VBS SET W3SVC/Filters/Compression/DEFLATE/HcScriptFileExtensions "asp" "dll" "exe" "pdf" "aspx" "svc"
CSCRIPT.EXE ADSUTIL.VBS SET W3SVC/Filters/Compression/GZIP/HcDynamicCompressionLevel 9
CSCRIPT.EXE ADSUTIL.VBS SET W3SVC/Filters/Compression/DEFLATE/HcDynamicCompressionLevel 9
CSCRIPT.EXE ADSUTIL.VBS SET W3SVC/Filters/Compression/GZIP/HcStaticCompressionLevel 9
CSCRIPT.EXE ADSUTIL.VBS SET W3SVC/Filters/Compression/DEFLATE/HcStaticCompressionLevel 9
CSCRIPT.EXE ADSUTIL.VBS SET w3SVC/Filters/Compression/Parameters/HcDoDynamicCompression true 
CSCRIPT.EXE ADSUTIL.VBS SET w3SVC/Filters/Compression/Parameters/HcDoStaticCompression true 
REM Added exclusion for careeradmin site; mark harr; 6/3/2009
CSCRIPT.EXE ADSUTIL.VBS SET W3SVC/2129524648/root/DoDynamicCompression false

That solved the issue.  But there were a couple other interesting things:



  • I first looked to turn off compression for just the file types (pdf, etc), but it turns out that IIS determines if compression will be done based on the requested file suffix, not the response headers. So since the file was downloaded from a postback to index.aspx, turning off compression on pdf did not have any affect.

  • Then I looked to turn off just for the page doing the download. But since the site was built with a single page (index.aspx) and loading different custom controls (ascx), I could not differentiate the page for IIS.

  • So I just turned off http compression for the admin site.  Figure that was not bad, since the site will only be accessed internally, and not likely over the internet, the lack of http compression will not be an issue.

  • After I finished this, I came up with the thought that perhaps adding a "Response-encoding: gzip" header with the file download may have also solved the problem.  IIS may have already setup that header when it determined it was doing http compression, and the code may have been clearing that header when it did the Response.Clear command before setting up its BinaryWrite.  But the code putting that header would need to ensure that compression was happening and only add the encoding header when desired.  Sometime when I have a few hours to look at that, I will see if that technique will work.

Labels: , ,

Friday, June 12, 2009

Using Windows 7 and Vista features in .Net code


Just released from Microsoft:

Windows? API Code Pack for Microsoft? .NET Framework (v0.90) - Home

Vista Bridge Sample Library 1.4

Some of the newer features in Vista and Windows 7 are not exposed in the .Net Framework (yet).  This package of source code from Microsoft shows how to access and use these features from managed code.  Some of the features here are:

Windows 7 Taskbar Jump Lists, Icon Overlay, Progress Bar, Tabbed Thumbnails, and Thumbnail Toolbars.

Known Folders, Windows 7 Libraries, non-file system containers, and a hierarchy of Shell Namespace entities.

Windows 7 Explorer Browser Control.

Shell property system.

Windows Vista and Windows 7 Common File Dialogs, including custom controls.

Windows Vista and Windows 7 Task Dialogs.

Direct3D 11.0, Direct3D 10.1/10.0, DXGI 1.0/1.1, Direct2D 1.0, DirectWrite, Windows Imaging Component (WIC) APIs. (DirectWrite and WIC have partial support)

Sensor Platform APIs

Extended Linguistic Services APIs

Power Management APIs

Application Restart and Recovery APIs

Network List Manager APIs

Command Link control and System defined Shell icons.

Labels: , , ,

Friday, June 05, 2009

SEO on Dynamic Pages

 

SEO on Dynamic Pages - URL rewrites, 301 Redirects, and more SEO on Dynamic Pages

Good article on enhancing SEO on catalog and other dynamic pages.

Labels:

Tuesday, May 26, 2009

Windows 7 tips, tricks and secrets

Sunday, May 17, 2009

Windows 7 RC: After 2 weeks

Well, I have been running Windows 7 RC for 2 weeks now on my main production machine.  Overall, it is very good: fast, pretty stable, and the new features are good. 

I especially like the new taskbar.  Reading the descriptions of it before I installed Win7, I was a little leery that it was better, that it was just different to be different.  But after working with it, it really is better.  I was worried that it would be confusing having both the "quick links" and taskbar together, but it really is not a problem; the active apps have an "aero" frame around them, and the unlaunched buttons do not.  I like the aero preview windows that popup when you hover the mouse over the button, but especially like when you hover the mouse over the preview window, the rest of the windows go "aero ghost" mode, so that window is the only one visible.

Problems so far are few, but here's what I have:

*  My Bluetooth mouse (MS Mouse Presenter 8000) frequently disconnects.  Sometimes it will reconnect in about 15 seconds or so, but most of the time I have to power cycle the mouse.  Hope a fix or updated mouse driver fixes that soon.

*  Windows Live Photo Gallery screensaver crashes and locks up.  I can get back by hitting Ctrl-Alt-Del, then Cancel and the system window then pops up about an unresponsive application.  So far, that is only screensaver that has a problem.
*  My Sierra Wireless AirCard 875U cellular modem needs to use the old Sierra 3GWatcher app, and Win7 does not "recognize" the network.  It works, and I connect OK, it is just that Network Center says it is "Unidentified Network", and I cannot properly set firewall options (public/private) or name.  I understand Win7 has newer drivers that treat cell modems like full fledged network adapters (like WiFi adapters), but not for my old(er) device.

And one changed item I am not completely sold on yet: taking out the Sidebar frame.  Sidebar gadgets are now undocked and floating (like you could in Vista if you dragged it from the frame).  But I liked how the Sidebar frame gave me "pages" for gadgets, and I could have a dozen or so gadgets ready when needed, but not cluttering up the desktop.  But now, floating gadgets are the only option.

Labels:

Thursday, May 14, 2009

New version ASP.NET AJAX Control Toolkit

New version (3.0.30512) ASP.Net Ajax Control toolkit.  Added 3 new controls, including an HTMLEditor and ComboBox (windows-like, dropdownlist and textbox). Also 20 bugfixes to existing controls.

ASP.NET AJAX Control Toolkit

Note that these controls work only with VS 2008 and .Net Framework 3.5.

Thanks to @shanselman who twittered this announcement.

Labels: ,

Wednesday, May 06, 2009

WM 6.1 Hot Fix for Sending SMTP E-mail

 

MS KB958639 Download details: WM 6.1 Hot Fix for Sending POP and IMAP E-mail

I was having a problem with Gmail apps on my WinMobile device, where I could not send email.  The only way around it was to delete and recreate the account.  Turns out it is a bug in WM 6.1, and this fixes the problem.

Labels: ,

Thursday, April 02, 2009

Google uncloaks once-secret server

Interesting look at Google's server designs, both the individual server (battery on the server instead of UPS, velcro wraps) and the container design.

Google uncloaks once-secret server | Business Tech - CNET News

Labels:

Sunday, March 22, 2009

Keep Vista from Changing Folder View : Steve Smith's Blog

For future reference.  This actually works!

Keep Vista from Changing Folder View : Steve Smith's Blog

Labels:

Friday, March 20, 2009

Microsoft Tag now can do black and white

Microsoft Tag can now do black and white tags, as well as color.  All the current readers already can handle the b&w.  And you can use both a b&w and color tag for same link.

image

=

image

 

Microsoft Tag : Feature: Microsoft Tag Black and white!

Labels: , ,

Wednesday, March 04, 2009

NOD32 changes licensing

Looks like Nod32, my favorite recommended antivirus solution, is changing their licensing just a bit, but will cost me bucks.

First, a little about what I am trying to do.  I run a pretty decent laptop with Windows Vista, 4gb ram, and anywhere from 2 to 7 hard drives (1 internal, of course, and the others on USB).  As a software development consultant, I run a number of virtual machines. Some are for unique setups for clients (their VPN, or older version of Visual Studio or Windows); some for testing purposes (e.g. clean systems for testing setup packages, older browser versions); some with server OS's (Windows server 2003 or 2008) with older SQL server, or SharePoint development.

Trying to have an antivirus solution properly licensed for all these virtual machines is a pain.  The only av product I found that allows virtual machines to share the same license as the host is Nod32.  So besides the very reasons to use this product (fastest, smallest memory footprint (100mb), and best detection (it heuristic engine has never missed an in-the-wild virus, ref), having to buy only one license makes it a very good fit for me.  And it is one of the few client antivirus products that will install on server OS's.

Starting with their version 3.0, the server OS's were no longer permitted for a single-user license, only a business edition license could install Nod32 v3 on Windows Server 2000/2003.  This was not too much of a problem, as we were permitted to use the previous version, v2.7, on the servers and was still supported.

Now here is the new problem.  Nod32 v4 was released this week.  And when my license it renewed, the new username will not be permitted for v2.7.  Nod32 v4 will still not allow installation on Windows servers with single-user license.  I will have to buy a new business edition license to be able to install on Windows servers on virtual machines.  But business licenses have to be purchased with a minimum of 5 users, at (currently) $42.99/user ($214.95), as compared to $39.99 for home/single-user.  So in order to install Nod32 on my server VM's, I need to buy for 4 unneeded/unused users.

My options are somewhat limited.  No one else allows licensing on virtual machines except as a separate machine and license (and since I have about 15 virtual machines, buying licenses for them is not an option).  AVG free edition is not an option, because it does install on server OS's.  Looks like I have to buy wasted business user licenses.

Labels: ,

Sunday, February 15, 2009

Microsoft Recite : Announcement - Microsoft Recite - Technology Preview

Cool new WinMobile app released by Microsoft. 

Microsoft Recite's voice search makes it easy to retrieve your stored thoughts and notes by using voice pattern matching. It analyzes the patterns in your speech and finds matches between two recordings -- the notes you stored on your phone, and the search you do using your voice. With Recite you can store thousands of spoken notes, and then later retrieve the notes you want based on a match with your search term(s). This is different from speech recognition, which has to accurately convert spoken words to application-readable input.

Microsoft Recite : Announcement - Microsoft Recite - Technology Preview

It would be really cool if this integrated with Outlook to create appts, events, notes.

Labels:

Wednesday, December 17, 2008

IE Critical Update

Microsoft has released the ultra-important IE Update

Run your Windows Update ASAP (if not sooner).

This fixes the recent exploits that have been working for the past 5 days or so.

Labels: ,

Thursday, December 04, 2008

A little geek humor at Microsoft

Just discovered a little geek humor at Microsoft. 

I have the unfortunate task of upgrading a VB6 app to run properly under Vista.  No, I could not upgrade the app to .Net, just "fix" the VB app and its installer.  So I'm installing VB6 in a Vista virtual machine (do not want to mess up my host machine), and having a little problem when starting VB, an error that mscomctl.ocx is not registered.  But it is, and I hunt down Dependency Walker (Depends) to make sure.  It's OK, and its components are OK, also. 

So I run profiler from Depends to start up VB6 and see what happens.  Find an error message*, and stop the profiler. That in turn stops the VB6 application, and profiler dutifully logs the exit return code, and helpfully translates the exit code to hex:

Terminating process by user's request.
Exited "VB6.EXE" (process 0xB84) with code 57005 (0xDEAD).

Had to chuckle.  And then went to calc.exe to confirm, decimal 57005 is hex 0xDEAD.

(*for what it's worth, the error is "GetProcAddress(0x75E70000 [KERNEL32.DLL], "IsTNT") called from "MSCOMCTL.OCX" at address 0x27588909 and returned NULL. Error: The specified procedure could not be found (127)."  Now I got to got figure that one out.)

Labels: , ,

Tuesday, December 02, 2008

New ASP.NET Charting Control

 

Microsoft has now released a ASP.Net Chart control.  Formerly from Dundas, this control was recently added to Reporting Services, and is now available for free for ASP.Net developers.

  • Download the free Microsoft Chart Controls
  • Download the VS 2008 Tool Support for the Chart Controls
  • Download the Microsoft Chart Controls Samples
  • Download the Microsoft Chart Controls Documentation
  • Visit the Microsoft Chart Control Forum
  • Ref from Scott Guthrie's blog: New ASP.NET Charting Control: - ScottGu's Blog

    Labels: ,

    Tuesday, November 18, 2008

    An Ajax Cross Browser GridView Fixed Header Extender

     

    DevArchive.net Blog: Cross Browser GridView Fixed Header Extender, ASP.NET AJAX

    A nice AJAX extender control for GridView to provide fixed header row for scrolling grid.

    Labels: ,

    Saturday, November 15, 2008

    jQuery Update: Intellisense

     

    Microsoft has released a patch for VS 2008 to enable better intellisense support for Javascript files, esp. jQuery.  This patch enhances VS to look for like-named javascript files for intellisense documentation.  For instance, for jQuery, you would have these lines in the head of your page:

    Downloads:

    VS 2008 SP1 Hotfix: http://code.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736

    jQuery:
    http://docs.jquery.com/Downloading_jQuery#Download_jQuery

    jQuery Doc:
    http://code.jquery.com/jquery-1.2.6-vsdoc.js
    (or use jQuery download above, and select the "Documentation: Visual Studio" link)

    Labels: ,

    Friday, October 17, 2008

    What is jQuery?

    I first heard of jQuery when Microsoft (actually, Scott Guthrie, the Microsoft VP for Developer Division) announced support for it (see the link below). Then, the .Net Developer User Group had a session on it last week. This is something simple, easy to implement and add to our toolkit, and can save a ton of time adding desirable features to our websites.

    If you have not heard about jQuery before:

    • JavaScript library, just link a javascript file to your web page to enable it.
      e.g. : <script type="text/javascript" src="../jquery.min.js"></script>
    • a lightweight JavaScript library, only 15kb in size.
    • Licensed under GPL or MIT (any and all use is free, commercial or otherwise permitted)
    • supported browsers: Firefox 1.5+, Internet Explorer 6+, Safari 2.0.2+, Opera 9+

    Good beginning description of it from Scott Guthrie’s blog (http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx):

    A big part of the appeal of jQuery is that it allows you to elegantly (and efficiently) find and manipulate HTML elements with minimum lines of code.  jQuery supports this via a nice "selector" API that allows developers to query for HTML elements, and then apply "commands" to them.  One of the characteristics of jQuery commands is that they can be "chained" together - so that the result of one command can feed into another.  jQuery also includes a built-in set of animation APIs that can be used as commands.  The combination allows you to do some really cool things with only a few keystrokes.

    For example, the below JavaScript uses jQuery to find all <div> elements within a page that have a CSS class of "product", and then animate them to slowly disappear:

    clip_image002

    As another example, the JavaScript below uses jQuery to find a specific <table> on the page with an id of "datagrid1", then retrieves every other <tr> row within the datagrid, and sets those <tr> elements to have a CSS class of "even" - which could be used to alternate the background color of each row:

    clip_image004

    Microsoft will be bundling and supporting jQuery from now on

    Again from Scott Guthrie’s blog:

    • “Microsoft will be shipping jQuery with Visual Studio going forward”
    • “We will distribute the jQuery JavaScript library as-is, and will not be forking or changing the source from the main jQuery branch.  The files will continue to use and ship under the existing jQuery MIT license.”
    • “will also distribute intellisense-annotated versions that provide great Visual Studio intellisense and help-integration at design-time.”
    • “add the jQuery library by default to all new projects.”
    • “We will also extend Microsoft product support to jQuery beginning later this year, which will enable developers and enterprises to call and open jQuery support cases 24x7 with Microsoft PSS.”
    • “Going forward we'll use jQuery as one of the libraries used to implement higher-level controls in the ASP.NET AJAX Control Toolkit.”

    Here are some links on jQuery:

    · http://jquery.com/

    · Download: http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.min.js&downloadBtn=%3CSPAN%3EDownload%3C%2FSPAN%3E

    · Documentation: http://docs.jquery.com/Main_Page

    · Tutorials: http://docs.jquery.com/Tutorials

    · Scott Hanselmann’s tutorial using jQuery in Visual Studio and Ajax and ADO.Net Data Services: http://www.hanselman.com/blog/jQuerytoshipwithASPNETMVCandVisualStudio.aspx

    Labels: , ,

    Wednesday, October 15, 2008

    Sorting out the different layers of virtualization | Virtually Speaking | ZDNet.com

    Basic description of the different types of virtualization:

    • Access Virtualization
    • Application Virtualization
    • Processing Virtualization
    • Storage Virtualization
    • Network Virtualization

    Sorting out the different layers of virtualization | Virtually Speaking | ZDNet.com

    Labels:

    Monday, October 13, 2008

    Backup that USB flash drive

    I had a problem with a flash drive this weekend, and it points to a problem that we all should be aware of.

    Flash drives (those USB memory sticks) have a limited life to them. The cheaper ones (most all of those that you can buy now) can only be written to approximately 10,000 times. (More expensive drives can be written to 100,000 – 200,000 times, but all drives have a limited life that way.) Now, for most uses, that can be a very long time. But if you depend on a single drive for frequent usage, it can fail.

    I have been using a Lexar 8gb ExpressCard SSD (solid-state disk) in my laptop for holding my ReadyBoost cache for Windows Vista. ReadyBoost improves system performance dramatically, especially in a laptop. However, after about 1½ years, the memory card failed. That’s when I found out about this limited life for flash drives. Although Microsoft says flash drives for ReadyBoost should last 10 years, my device may have had a defect, or a bug in Vista that was fixed may have caused extra unnecessary rewriting of the device when resuming from standby (which I do all the time instead of shutting down). For now, I am just getting another memory card and doing the same thing. If, in another 18 months, it fails again, then I will reconsider more expensive memory, but $47 for 18 months of use is not a bad trade-off.

    So, if you are using a USB drive to do frequent backups (that’s you, Dad), you should be aware that the drive could fail, and have an alternate storage of that data. If you are backing up your QuickBook files to a USB flash drive, make another copy of that drive each time to another device, preferably a hard drive with better life. Or maybe an online backup like using Mozy, Windows Live Skydrive, or even just storing it in a Gmail account.

    Labels: ,

    Thursday, July 03, 2008

    Windows Mobile: Configuration Steps to Test localhost Web-Services

    This blog entry describes how to configure VS2008, WMDC and Windows Mobile Device Emulator to call local web services running under VS debugging.

    This was also useful as it fixed my perplexing problem trying to get Device Emulator to connect to WMDC so that I can install .Net CF 3.5.  Specifically, making sure transport mode is DMA in WMDC, VS, and the device; and device emulator must be in Cradle mode.

    Public Sector Developer Weblog : Windows Mobile 6: Configuration Steps to Test localhost Web-Services

    Labels: , ,

    Monday, June 09, 2008

    Add Blackberry support to Forms Server 2007 or Sharepoint 2007 - Andru's WebLog

    Monday, June 02, 2008

    How to install Windows SharePoint Services 3.0 SP1 on Vista x64/x86 - The Bamboo Team Blog

     

    How to install Windows SharePoint Services 3.0 SP1 on Vista x64/x86 - The Bamboo Team Blog

    I will have to give this a try.  It would make developing for SharePoint much easier than having to install server OS in a VirtualPC instance.

    Labels: ,

    Wednesday, May 28, 2008

    Introducing RockScroll

     

    Very cool add-in for Visual Studio, from:

    Scott Hanselman's Computer Zen - Introducing RockScroll

    The basic (as in "only") idea is that RockScroll extends the scrollbar in Visual Studio to show a syntax highlighted thumbnail view of your source. This is really useful for those excessively long source code files...

    RockScroll

    Labels: ,

    Thursday, May 01, 2008

    Free Windows Mobile Remote Admin App

    Larry Larsen on Channel 10 posts about an neat free little app for remoting into Windows Mobile phone.  Will do screenshots and video capture for documentation and training sessions, as well as making the screen larger for those of us that are a little older and more visually challenged. wink

    PhoneCapture 
    Screen shot from my BlackJack

    Free Windows Mobile Remote Admin App | Larry Larsen | Channel 10

    Labels: ,

    Wednesday, April 30, 2008

    Fixing Windows Vista, Taming UAC

     

    Fixing Windows Vista, Part 2: Taming UAC | Ed Bott’s Microsoft Report | ZDNet.com

    Useful article for getting around some of Vista UAC annoyances, but still keeping UAC in place (and why you want to keep UAC and not totally disable it).

    Labels:

    Wednesday, April 23, 2008

    Cleveland Day of .Net 2008

    Cleveland Day of .NET

    Labels: ,

    Monday, April 21, 2008

    Regular Expression resources

    Regular Expression resources


    A nice resource of some regualar expression resources, by the author of Expresso, a very good tool for building and testing regexp, even generating VB.Net/C#.Net code. Also a link to Regular Expression Library, a repository of common tested reg exp.

    Labels: ,

    Monday, March 10, 2008

    How To Search Your PSTs with Vista's Built-In Search | Sarah In Tampa | Channel 10

    Do you archive your email to PST files (maybe due to a corporate policy limiting your mailbox size)? ...With Vista's built-in search option, you can specify that you want PSTs to be indexed (this is not turned on by default).

    Labels:

    Tuesday, February 19, 2008

    Microsoft DreamSpark

     

    Microsoft DreamSpark

    Today, Microsoft announced that college students can download Visual Studio, SQL Server, Expression Blend, even Windows Server FOR FREE!

    How would you like a free copy of Microsoft Visual Studio 2008? How about the entire Microsoft Expression Studio? Not enough...... how about Microsoft Windows Server 2003 and more?
    For once, something that sounds too good to be true really is this good and really is true. Starting today (or soon in some areas), students worldwide will be able to download our professional development and design tools for free! It's called DreamSpark and it is upon us.

    Wow.  Why?  From PressPass:

    PressPass: What is the thinking behind Microsoft DreamSpark? And how did you come up with the name?

    Wilson: Microsoft DreamSpark is a community-based program to provide students with free access to Microsoft’s industry-leading software development, gaming and design tools. Working with schools, governments, partners and student organizations worldwide, we will be making this available starting today in Belgium, China, Finland, France, Germany, Spain, Sweden, Switzerland, the United Kingdom and the United States. Other countries will come online over the next year, as well as expanding the program to include high school students. The program is open to all students at education institutions worldwide, though those studying science, technology, engineering and math disciplines (STEM-D) are expected to be the first to jump on it. All eligible students need is access to a computer with an internet connection to download the products, as well as free access keys at http://channel8.msdn.com.

    We call it DreamSpark because every great technology breakthrough starts life as someone’s dream or idea. We want to make sure that students have the tools to spark their own dreams plus the power to turn them into reality.

    PressPass: Why is Microsoft doing this?

    Wilson: We believe students can do amazing things with technology if given access to the right tools. This is a way to make sure that they have what they need to test the boundaries of what today’s technology can do and also prepare for a great career at the same time. The added benefit to industry is that we’re addressing one of the toughest challenges confronting employers today: attracting and developing qualified IT professionals. We’re trying to help close this gap by giving students globally the opportunity to get the tools they’ll need after they graduate and jump-start their careers to land that first job.

    Making sure there is a strong pipeline of technically skilled students is key to the future of the global economy. The ability to create new software and services will be an essential part of the skill set of the next generation of workers. Technology is one of the chief drivers pushing worldwide economic development and job creation. As well as giving students important exposure to the tools they can expect to use in the workplace, DreamSpark is about putting professional-level tools in the hands of students to amplify the impact of their studies and fire up their imaginations about the power of technology.

    Labels: , , ,

    Saturday, February 16, 2008

    Vista SP1 Installed

    Check your languages installed

    Well, I bit the bullet and installed Vista SP1 today.  Overall, looks OK right now, but I did have a problem starting up the SP installation.  SP1 would not install, saying I did not have valid language pack installed.  I am certainly running English-US, setup for US settings, so I had a problem why this was saying I was not.  Checking a few things, I saw that somehow I had Hebrew language also installed (not sure why or how, as I cannot read Hebrew).  Once I uninstalled that language and restarted, then the SP1 install went flawless.  I just started it and left it alone for a couple hours, so I'm not sure how long it really took.

    I don't see much difference right now.  I will post back if I notice anything.

    Labels:

    Wednesday, February 06, 2008

    Visual Studio 2008 Product Comparison

    This article is an extensive comparison of the different editions of Visual Studio 2008.

    This is a short clipping to demonstrate the article contents.

    image

    Tuesday, February 05, 2008

    Which is Faster: SAN or Directly-Attached Storage?


    Or should I place my database files on SAN or directly-attached storage?

    Article on SQLTeam.Com on whether SAN or DAS is better for database files. Quick answer: It depends (of course).

    Which is Faster: SAN or Directly-Attached Storage?

    Labels:

    Windows Vista SP1 is done

    Windows Vista SP1 is done | Ed Bott?s Windows Expertise |


    Microsoft announced that Windows Vista Service Pack 1 has concluded its beta testing and has been released to manufacturing. So, does that mean you can install it today? Nope.

    Labels:

    Tuesday, January 29, 2008

    VS2008 Web Deployment Project Released

    Scott Guthrie's blog announces "RTW (release to web) support for VS 2008 Web Deployment projects".

    Web Deployment projects can be used with either the "ASP.NET Web Site" or "ASP.NET Web Application Project" options built-into VS 2008, and provide a few additional build, packaging and deployment options for you to use.

    It also adds additional support for:

    • Easily migrating VS 2005 Web Deployment Projects to VS 2008 Web Deployment Projects
    • Replacing output only if web deployment builds succeed
    • IIS7 Support

    Labels:

    Monday, January 28, 2008

    SQL Server 2008 Not Until Q3 2008

    The Data Platform Insider : Microsoft SQL Server 2008 Roadmap Clarification


    Microsoft is excited to deliver a feature complete CTP during the Heroes Happen Here launch wave and a release candidate (RC) in Q2 calendar year 2008, with final Release to manufacturing (RTM) of SQL Server 2008 expected in Q3.

    Labels:

    Thursday, January 03, 2008

    The Visual Basic Team : Hidden Gems in Visual Basic 2008 (Amanda Silver)

    The Visual Basic Team : Hidden Gems in Visual Basic 2008 (Amanda Silver): "Hidden Gems in Visual Basic 2008"


    0) Multi-targetting
    1) Type Inference
    2) If Operator
    3) Object Initializers
    4) Nullable
    5) LINQ to DataSet
    6) Syntax Tooltips
    7) XML Namespace support in Intellisense
    8) GoTo Type Definition
    9) Type inference for loop variables
    10) Performance improvements and? Non-blocking operations!

    Labels:

    Monday, December 03, 2007

    Shift Happens

    Shift Happens

    I originally read this on Randy Cassingham's blog. Read his essay first, then be ready to reevaluate how you think of this world.



    shifthappens.wikispaces.com

    Tuesday, November 06, 2007

    Hotfix for Vista ICS

    Aaron Tiensivu's Blog: KB 937168 - After you configure Internet Connection Sharing in Windows Vista, the network connection stops working after one-to-two hours.

    After you configure Internet Connection Sharing in Windows Vista, you may find that, although the network connection works correctly at first, the network connection stops working after one-to-two hours. For example, you may be unable to connect to the Internet, to other computers on the local area network (LAN), or to network resources on the LAN. .... This problem occurs because of a bug in the WinSock bind() function.


    Ran across this problem setting up loopback adapter for VirtualPC to be able to still access internet. Internet access is through cell modem (Sierra Wireless 875U), so cannot use the adapter and get another IP address. Also need to access host-2-guest and guest-2-host without having DNS server, so needed to use loopback adapter.

    Labels:

    Thursday, November 01, 2007

    Get a faster hard drive

    Tip/Trick: Hard Drive Speed and Visual Studio Performance - ScottGu's Blog

    Scott Guthrie (manager in MS Developer Division and VS guru) says getting faster hard drive is better for VS than faster processor. He explains this, and offers some other tips for optimizing VS performance.

    Labels:

    Tuesday, October 23, 2007

    ASP.NET MVC Framework - ScottGu's Blog

    ASP.NET MVC Framework - ScottGu's Blog

    Scott Guthrie is working on implementing a bolt-on MVC framework for ASP.Net 3.5; should be out shortly after VS2008, and built into .Net 3.5 SP1.

    MVC (Model-View-Controller) framework may be the piece that I considered missing in AJAX, but could not put my finger on. Like many new things, it is based on some older tech (Smalltalk in 80's), and its underlying architecture is not too far different from what has been done in the past. But this could help to really tie things together, especially with some web controls that have inherit MVC functionalality.

    HMMM

    Labels:

    Tuesday, September 04, 2007

    Day of .Net in Ann Arbor

    Day of .Net October 20, 2007 - See You there!

    Day of .NET in Ann Arbor is a one-day conference on all things .NET organized by developers for developers. This event is being offered at no cost to anyone interested in .NET development, and will take place on October 20, 2007 at Washtenaw Community College in Ann Arbor, MI.

    I will probably attend this, though it is a bit out of the way. But we don't seem to get these types of events locally. Sam, Gary: want to go?

    Labels:

    Monday, August 27, 2007

    Scott Hanselman's Computer Zen - Scott Hanselman's 2007 Ultimate Developer and Power Users Tool List for Windows

    Tuesday, August 21, 2007

    How to troubleshoot Service Broker problems - SQLTeam.com

    How to troubleshoot Service Broker problems - SQLTeam.com

    Nice article that lists the different areas to check when troubleshooting problems with SQL Server's Service Broker.

    Labels:

    Monday, August 20, 2007

    Reporting Services Cribsheet

    Thursday, July 19, 2007

    Silverlight Applications

    Tim Sneath: From A to Z... 50 Silverlight Applications
    It's great to see so many Silverlight-based widgets, samples, demos and applications appearing out there. I spent a happy hour this morning searching around the Internet for examples and samples, and thought I'd aggregate the fruits of my research below.


    Especially check out the Airlines Demo and the Amazon Search Visualization

    Labels: ,

    Wednesday, July 18, 2007

    SQL Server: Temporarily Changing an Unknown Password of the sa Account

    Temporarily Changing an Unknown Password of the sa Account
    Handy process for temporary changing SA password then changing it back, for those times when SA password is not known (was not documented and DBA who installed it is gone). Also, could be used to change unknown SA password, assuming that you are willing to put up with and fix possible broken apps/processes using the old SA password.

    Labels:

    Monday, July 16, 2007

    SQL Server Performance Impact of Procedure Calls without Owner Qualification -- SQL Server 2000

    Linchi Shea : Performance Impact of Procedure Calls without Owner Qualification -- SQL Server 2000
    The first thing to note is that on SQL Server 2005, the performance degradation caused by procedure calls without owner qualification was less than 5% with 100 or more concurrent users, whereas on SQL Server 2000 the performance degradation with exactly the same test workload was between 15% and 26% with 100 or more concurrent users.

    Also interesting to note is the performance increase for SQL Server 2005:
    With procedure calls owner qualified, SQL Server 2005 showed 15~18% improvement over SQL Server 2000 under heavy load. With procedure calls not owner qualified, SQL Server 2005 improved transaction throughput by a whopping 35~55% under heavy load.

    Labels:

    Wednesday, July 11, 2007

    Doug Seven : Windows Server 2008, Visual Studio 2008 and Microsoft SQL Server 2008 Joint Launch Announced

    Tuesday, June 05, 2007

    Free SQL Tools from Idera

    Idera: Tools for Data Management - Products


    Idera is making a couple of their tools available for free, including:
  • SQLsafe backup utility, which compresses backups and makes them run faster ().
  • SQLCheck, which does performance monitoring and can run as secure screensaver.
  • SQLPermissions, for copying/moving logins and permissions across servers.

    Labels:

  • Wednesday, May 23, 2007

    Get Calling MethodName

    A question came up in last night VB.Net User Group about how to get the calling method when using a common exception handling method. I remembered I did it somewhere before, but could not even remember any part of it to look up at the time. So I post it here and will send it to Sam for posting to the SIG blog.


    Basically, you instantiate a System.Diagnostics.StackTrace object with the StackTrace from the Exception object, then get the MethodName from that. Here is an example using a Console app:



    Imports System.Diagnostics
    Imports system.reflection
    Module Module1
      Sub Main()
        Try
          Throw New ApplicationException("HAHA")
        Catch ex As Exception
          ProcessException(ex)
        End Try
      End Sub

      Sub ProcessException(ByVal ex As Exception)
        Dim stackTrace As StackTrace = New StackTrace(ex)
        Dim stackFrame As StackFrame = stackTrace.GetFrame(0)
        Dim methodBase As MethodBase = stackFrame.GetMethod()
        Console.WriteLine("Error in Method {0} ", methodBase.Name)
      End Sub
    End Module


    Also, you can instantiate the StackTrace object without any arguments, and it loads the current method. You can then get the calling method (or the entire CallStack of methods) at any point in your code by walking through the StackFrames.



    Imports System.Diagnostics
    Imports system.reflection
    Module Module1
      Sub Main()
        A()
      End Sub

      Sub A()
        B()
      End Sub

      Sub B()
        C()
      End Sub

      Sub C()
        Dim stackTrace As StackTrace = New StackTrace()
        Console.WriteLine("Called By Method {0} ", stackTrace.GetFrame(1).GetMethod().Name)
        Console.WriteLine("Listing the Entire Stack Trace:")
        For Each stackframe As StackFrame In stackTrace.GetFrames()
          Console.WriteLine("Method {0} ", stackframe.GetMethod().Name)
        Next
      End Sub
    End Module

    Labels: , ,

    Friday, May 04, 2007

    Coming soon: VBx!

    Several bloggers and news articles on new version of Visual Basic that was referred to (but not announced) at MIX07 conference this week.

    From Panopticon blog: What the heck is "VBx"?
    ...though, I can now take a bit of the wraps off. "VBx" is our current (subject to change) codename for the next major version of Visual Basic. (The "x" is supposed to signify the Roman numeral X, or 10, since the next major version of Visual Basic is going to be 10.0.


    From The Visual Basic Team Blog:
    What do the announcements at Mix mean for the Visual Basic developer?
    VB on Silverlight ? In short, this means that you can now use Visual Basic as the code-behind for whiz-bang rich interactive applications that run on Windows or the Mac and can run in IE, Firefox, and Safari.

    Labels: