Posts

Showing posts from 2007

Windows Server 2008 x64: Could not load file or assembly Microsoft.SqlServer.BatchParser...

The best minds are not in government. If any were, business would hire them away. - Ronald Reagan I was working with a partner on testing his MSI Installer for various operating systems, and on Windows Server 2008 x64 it was continuing to come up with this error: Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. (Microsoft.SqlServer.ConnectionInfo) I checked the signature of the local assembly in the installation folder against the one in the GAC, and they were identical. So, go figure, right? It turns out that the solution is very simple: Unless you've installed the 64-bit verion of SQL Server 2005, you need to install the 64-bit version of SMO. It's not there by default. If it is not installed ,you can download the 64 bit version from http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9F

DotNetNuke: Ready for Prime Time?

"The delivery boys have been displaced by Comcast and AT&T and Google and Yahoo, and there's no way newspapers will ever reclaim that role." -- Justin Fox, Time Our group at work needs desperately to have a CMS that is easy to work with for various clients -- especially clients that need to be able to "edit" their own corporate web sites. Basically, we needed to have a CMS with which we could just "plug in" a customizable pre-made CSS XHTML "skin" for a particular industry, and customize it to the client's desires. So, we all went out and started researching various offerings. Sharepoint was eliminated, it is simply too "high end" and expensive for what we need to be able to do. We looked at Joomla and Drupal, both had their plusses and minuses, but mainly they're interpreted PHP and though we've got PHP people, most of us are hard - core .NET developers. We looked at Umbraco, Rainbow, MojoPortal, Cuyahoga, and othe

Getting rid of Visual Studio 2005 - And a Poll

Image
At work, our .NET development group more or less unanimously made the decision that now that Visual Studio 2008 is RTM, it is time to think about getting everything we do upgraded to the point where we simply don't need Visual Studio 2005 any longer. The only real issue we could find is that Compact Framework 2003 projects are no longer supported. Since we don't happen to have any, that takes care of that, doesn't it? So we decided that any existing projects would be migrated upwards to Visual Studio 2008. Everything in Team System is getting upgraded; if it doesn't support Visual Studio 2008, we'll let VS 2008 convert it and check all the revised stuff back in. Since 2008 solutions / projects can be set to target specific runtimes you will find that this is pretty much a no-brainer. If your stuff is .NET Framework 2.0 compliant, all you need to do is ensure that the target Framework is set and you can check your stuff in with a Visual Studio 2008 Solution file and

Visual Studio: Difference between Build and Rebuild

Believe it or not, I was never sure about this until this morning when another dev and I were discussing it. So, I searched the web and found the answer: Build means compile and link only the source files that have changed since the last build, while Rebuild means compile and link all source files regardless of whether they changed or not. Build is the normal thing to do and is faster. Sometimes the versions of project target components can get out of sync and rebuild is necessary to make the build successful. In practice, you never need to Clean. Build or Rebuild Solution builds or rebuilds all projects in the your solution, while Build or Rebuild <project name> builds or rebuilds the StartUp project. To set the StartUp project, right click on the desired project name in the Solution Explorer tab and select Set as StartUp project. The project name now appears in bold. Compile just compiles the source file currently being edited. Useful to quickly check for errors when the r

Internet Explorer 8.0 to pass Acid 2 Test

With Beta 1 targeted for first half 2008, the folks at Microsoft are now saying that as of last week, IE8 reached a core milestone: IE8 in standards mode now correctly renders the “ Acid2 Browser Test ”. Acid2 is a test that determines how well a browser works with several different web standards. I posted about this earlier, mentioning that not even the current edition of Firefox handles the acid2 test correctly. Of course I was quickly reminded by commenters that it did a much better job than IE7, and that's true. But the best news (besides the obvious fact that Microsoft embraces and sees the need for standards) is that they are going to do it in a way that doesn't "break" existing pages written for IE5 or IE6, or for the standards mode of other browser brands: Modern browsers typically have two modes to render web pages, “quirks” and “standards.” MS says their experience with releasing IE7 taught them that many web sites today expect the browser to have IE6-compat

The ASP.NET 3.5 Extensions Preview --MVC, Entity Framework, ADO.NET Data Services +

"If I Dispose the Car, will my delegate references be garage collected?" -- newsgroup poster This provides new functionality to ASP.NET 3.5 and ADO.NET in 2008. The new features target MVC, Entity Framework, ADO.NET Data Services and dynamic data Supporting Test Driven Development - including a powerful and extensible MVC framework. Creating the best server for Rich Clients - including Ajax history support and Silverlight controls for ASP.NET. The Readme is here . The download of ASP.NET 3.5 Extensions Preview is here . I did some early work with the Entity Framework and liked what I saw. Don't you just love those little installer messages, "The installation is taking longer than expected . . ."? And More Cool Stuff A couple of other items you might be interested in (at least, that I am interested in): 1) The FeedSync API. Formerly Ray Ozzie's "Simple Sharing Extensions". The easiest way to get into this is to download and play with the codeplex s

Umm, Did you search first?

"There is no shame in stating the obvious, as it may not actually be obvious to others." -- Me Newsgroups and forums are littered with well-intentioned but often moronic posts asking questions that could be easily answered - in a majority of cases - by simply typing the relevant search term into the Google search textbox and pressing the "SEARCH" button. Often these same posts are cluttered with replies from equally lazy people who offer opinions, advice and such --and who have not bothered to search either! A case in point: User posts a somewhat sarcastic item asking if there is an easy way to use Oracle for Session state, intimating that "not everybody uses SQL server". There are three replies, all of them more or less useless, because they didn't offer a real answer - which could easily have been determined with a 30 second search! So I did the search: http://www.google.com/search?q=ASP.NET+ORACLE+Session+provider Not exactly rocket science! And rig

Google PageRank Crash of 2007 Confirmed

When a thing is funny, search it carefully for a hidden truth. -- George Bernard Shaw Not long ago I wrote about what I call the " PageRank Crash of 2007 " where legions of very big blogging-related sites and commercial ventures -- Washingtonpost.com, Forbes.com, Engadget.com and SFGate.com noticed a downgrading in their PageRank. I also proclaimed, "Now, this is big - you may not grok it right away, but it's going to change the entire complexion of the web, and pretty quick, too. Hopefully, for the better..." Confirmation comes via posts on Google's official WebMaster blog by Matt Cutts (as well as on his personal blog): "If, however, a webmaster chooses to buy or sell links for the purpose of manipulating search engine rankings, we reserve the right to protect the quality of our index. Buying or selling links that pass PageRank violates our webmaster guidelines ." In fact, Cutts points out that as early as Feb 2003 Google stated "Don'

Warning!: blockdelete.com- Protect Your Ass!

Those nasty spammers have apparently reappeared, using a private domain registration through GoDaddy. What they do is capture your Windows Live Messenger credentials under the ruse that they will show you all your blocked contacts (which is easy enough to do yourself with libraries like DotMsn - without the security risks). What they don't tell you is that if you do this, your account is now compromised -- and they'll send every one of your contacts a message (since it's your credentials, it appears from you , a trusted contact) that tells you to go visit their site and sucker for it too. There's only one solution if you suckered for it - you have to change your Live.com password immediately . Just look at this: "The longly[sic] awaited feature for MSN Messenger, completely for free[sic]!" When you click on their Privacy page link, you get nada! What a scam. Unfortunately, from reading the newsgroup and forum posts, it appears that thousands of people are ge

The Top Nine Social Networking Sites

Q: Who was the pitcher to pitch the only perfect game in the World Series? A: Don Larsen, October 8, 1956, as the New York Yankees beat the Brooklyn Dodgers, 2-0. I've seen a few compilations on this subject, but the methodology in some cases seemed either flawed or not objective enough (surprise), so I though it would be useful to conduct my own research piece. If you take the "authority" approach on this, it makes it a lot easier to rank these various sites and eliminate the vast majority since they simply aren't strong enough to appear on the radar. Basically I got lists of networking sites and did a Google PageRank on all of them. Everything below PageRank 7 was thrown away. That narrowed down the field to 9 sites (boy, that part was easy!). Then, I got the Quantcast.com visitor counts and the Compete.com visitor counts. Then I compiled a composite number of inlinks for each site. Finally, I got the Alexa rank for each. What I did then was to try and come up with

Visual Studio 2008 Solution / Project File Conversions And Tricks

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut" -- Ernest Hemingway One thing I've learned to do pretty quickly with VIsual Studio 2008 is to make a backup of the original Visual Studio 2005 .soln and .csproj files and store them in a little .rar or .zip file in the Solution folder. This makes it easy to "go back to the future" as long as your work doesn't include namespaces that don't exist for VS 2005. Yes, I know you can choose to make a backup during the conversion. I'd just rather be safe. I also learned that the conversion process when you load a 2005 Solution and go through the conversion wizard can be quite slow. Here's a neat way to speed it up. Devenv.exe has a /convert flag. So, make a little batch file that looks like this, and save it in your Solution / project folder: "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe /convert" %1 To run this, drop into a C

419 Redux: Scamming the Scammer

Recently I've noticed a significant increase in the number of 419 scam emails that land in my junk mail folder before I clean it out daily - and occasionally a few don't even get dumped into the junk mail folder - they end up directly in the inbox!   Most of us already have learned to trash this utter bullshit, but it's a numbers game. The scammers know that if they send out 50,000 of these at a time (and believe you me, that's exactly what they do) -- that some poor uninitiated soul will respond, not knowing any better. And unwitting respondees do lose real money to these scumbags. As an old commodities trader once advised me as a rookie broker - "There are only two factors that control the market - fear, and greed" - and these scammers are finely honed experts at working the greed factor. For those who aren't totally familiar with the iterations of this scam, it operates as follows: the target receives an unsolicited fax, email, or letter often concern

New .NET Service Packs Available

Microsoft .NET Framework 2.0 Service Pack 1 (x86): http://www.microsoft.com/downloads/details.aspx?FamilyID=79bc3b77-e02c-4ad3-aacf-a7633f706ba5&DisplayLang=en Microsoft .NET Framework 2.0 Service Pack 1 (x64): http://www.microsoft.com/downloads/details.aspx?FamilyID=029196ed-04eb-471e-8a99-3c61d19a4c5a&DisplayLang=en Note that the 2.0 Service Pack is actually a full Framework install. If you uninstall .NET 2.0 SP1 (even if you had .NET 2.0 installed beforehand) the whole .NET Framework is removed. It does NOT revert you back to .NET 2.0 RTM. Microsoft .NET Framework 3.0 Service Pack 1: http://www.microsoft.com/downloads/details.aspx?FamilyID=ec2ca85d-b255-4425-9e65-1e88a0bdb72a&DisplayLang=en When you install the .NET Framework 3.5, these service packs are required prerequisites and are installed automatically; these are available as separate downloads for those who aren't ready to deploy .NET Framework 3.5. If you are installing Visual Studio 2008, you don't ne

Visual Studio 2008 RTM - and Holiday Chili Recipe

Image
"The kind of pictures they're making today, I'll stick with toilet paper" -- Dick Wilson (Mr. Whipple, R.I.P.) Well, it's Monday AM Nov 19th and the good news is that VS 2008 RTM is available for download by MSDN subscribers. The bad news is that the traffic jam has long since started, so it's not likely too many people will be able to get their copy today. (Oops - spoke too soon, just got an FTM going at 8:50 AM)! Also available is the Visual Studio 2008 and .NET Framework 3.5 Training kit. http://go.microsoft.com/?linkid=7602397 (120MB). This includes presentations, hands-on labs and demos -- and is designed to help you learn how to utilize the Visual Studio 2008 features and a variety of framework technologies including LINQ, C# 3.0, Visual Basic 9, WCF, WF, WPF, ASP.NET AJAX, VSTO, CardSpace, SilverLight, Mobile and Application Lifecycle Management. There are some very specific instructions on what to do if you have pre-release versions of VS or any rela

Pattern Madness, Anyone?

Here is an interesting newsgroup post that illustrates a common problem of programmers (usually new ones, but - not always!): "I have just started to rewrite my application using the Presenter First Design Pattern to make sure my business logic is not in the Gui itself. I've got the general idea but I'm a bit unsure as to how I should be launching a dialogue window from my main application window. What i have done is this in a nutshell. My main application window comprises of a Model, Presenter and a View. The Popup window also has a Model, Presenter and View. This is the process of what happens when the button is clicked is as follows. 1. Button clicked, delegate function in presenter called from main View. 2. Method in main presenter calls a method in main model to open the window. 3. Method in main model instanciates popup view, popup model and binds with popup presenter. 4. Method in main model calls method in popup model to open the window. 5. Method in popup model us

How to store a date in 4 bytes?

"My Karma ran over your dogma." - Unknown This was an interesting little C# newsgroup nugget. User has a registration code with 4 unused bytes, and wants to know how to store a date in same. (Actually I believe the user was thinking of 4 extra characters in a string - not "bytes", but the exercise is still a good one). Suggestions were made to store an integer representing the number of days from a fixed date. That would certainly do it, but it doesn't convey any context. Here's my take: using System; using System.Collections.Generic; using System.Text; namespace _bytedate { class Program { static void Main(string[] args) { // this makes sorting by date on an integer value perfect, // e.g. year+month+day, padded to make an integer int myDate = 20071105; byte[] b = BitConverter.GetBytes(myDate); Console.WriteLine(b.Length.ToString() + " bytes."); // reads "4 bytes" // And -back again: Console.WriteLine("Original: " +BitConverter

System.Web.Caching.Cache, HttpRuntime.Cache, and IIS Recycles

Recently I chimed in on a newsgroup thread to an OP (Original Poster) who was questioning why he was losing Cache items. This individual would load a dataset from the Cache object into a local object to use to perform processing. He had been using httpcontext.current.cache and noticed that sometimes he was not able to get the dataset out of the cache. He tried switching to HttpRuntime.Cache and it seemed to help. The OP claimed that the application is under heavy hits, and once or twice every month he would see this error. He wanted to know why does the HttpContext.Current.Cache call work sometimes, while some other times does not. A couple of posters replied, one of whom is a respected MVP who usually makes very astute, high-quality posts. He posted," The cache is only valid during the life of the request. how is you[sic] code using the cache?" Somebody else (also pretty astute, usually) responded, "Cache is valid during lifetime of application not request.....". W

Entity Framework Goodness

Image
I finally got around to the Entity Framework BETA 2, and I like it already. To play with this, you need these bits; Entity Framework Beta 2: http://www.microsoft.com/downloads/details.aspx?FamilyID=f1adc5d1-a42e-40a6-a68c-a42ee11186f7&displaylang=en Tools, Aug 2007 CTP: http://www.microsoft.com/downloads/details.aspx?FamilyId=09A36081-5ED1-4648-B995-6239D0B77CB5&displaylang=en There is also a nice "Getting Started" piece on codeplex: Getting Started: http://www.codeplex.com/adonetsamples/Release/ProjectReleases.aspx?ReleaseId=7792 I decided to brave it and just roll a quickie on my own from the Northwind database. All you do is Add New Item / ADO.NET Entity Data Model, which gives you a wizard to choose what database objects you want modeled, and then you get a nice class diagram: All your entity model code is built for you. So to say, get 10 products from the Products table via a nice little LINQ query: // Get 10 products via Entity LINQ query using (NorthwindMod

Google PageRank Crash of 2007: What's the Skinny?

"To the moon, Alice" -- Jackie Gleason (Ralph Kramden, The Honeymooners) The BlogOSphere has been buzzing the last couple of days since everybody discovered that the Googly-Bear decided to update it's PageRank algorithm (there had been hints for weeks before, to be sure -e.g., Danny Sullivan, Oct. 7 ). Ah, "poor little me", huh? Legions of very big blogging-related sites and commercial ventures -- Washingtonpost.com, Forbes.com, Engadget.com and SFGate.com noticed a downgrading in their PageRank. Some sites went up in PageRank. Our eggheadcafe.com site went from 5 to 6. One of my newest "playground sites", blogmetafinder.com , went from zero to a PageRank 3. This UnBlog remains unchanged, for now, at PR 5. Most experts agree that the key determinant was the practice of "buying links" such as text link ads and the like. Apparently, Google just decided to close up this last little loophole, and they did it with ample warning too. Now, this is

Visual Studio 2008 (ORCAS) "Project Creation Failed"

For a list of all the ways technology has failed to improve the quality of life, please press three. -- Alice Kahn This is due to some assembly redirects that are added to the devenv.exe.config file by installing the GAX (Guidance Automation Extensions). Here is the fix, and it's an easy one: 1) Navigate to: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE in Windows Explorer 2) Load devenv.exe.config in your favorite text editor. 3) Find this string: "Microsoft.VisualStudio.TemplateWizardInterface" 4) Comment out the element so it looks like this: <dependentAssembly> <!--assemblyIdentity name="Microsoft.VisualStudio.TemplateWizardInterface" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /--> <bindingRedirect oldVersion="0.0.0.0-8.9.9.9" newVersion="9.0.0.0" /> </dependentAssembly> 5) Restart Visual Studio 2008. All fixed!

A $15 Billion Bubble? You Decide...

With Microsoft (MSFT) buying a very minority share that values Facebook at $15 billion, it looks like "bubble or bust". A lot depends on whether you believe Facebook is just the latest online fad—or whether the social network is building the next, great computing "Thing". Facebook, which is closing in on 50 million members, theoretically promises to restore control to social networking—over privacy, unwanted email, and virtual contact— back to the user. If you divide the estimated valuation ($15 Billion) by the number of users that means each Facebook user is potentially monetized at about $300. Obviously, users aren't being monetized at that level now. I'm a Facebook user, and while it was kinda cool at first, seeing people that I know who have joined, and being invited to be "a friend" of some people that I respect or like, I already find that the bloom is off the face, if you will - and I really don't visit much at all anymore. So, how does

Un-Captcha Techniques Redux

I've spent a bit of time working on alternative CAPTCHA techniques, mostly because I've found that the vast majority of CAPTCHA offerings are non-intuitive and even for people with excellent eyesight, don't always "make it" the first time around. I have pretty good vision, but I find myself constantly frustrated by stupid case-sensitive CAPTCHA requirements that I simply cannot pass the first, sometimes the second and even as many as three tries. Webmasters and site developers are like lemmings - they seen something that somebody promotes, they copy it, they use it, but they DON'T THINK! WTF?  All one needs to do is look at Jeff Attwood's blog and you can see that he requires the user to type in a clearly readable "ORANGE" every time - and it works perfectly! The Bots simply don't get it. It's easy to see, easy to read, and shows how UTTERLY RIDICULOUS  these various CAPTCHA images are to the user, and how they literally destroy the us

The Project XXX could not be opened because the Microsoft Visual C# 2008 compiler could not be created

If you have any experience installing Microsoft Beta or CTP offerings, then uninstalling to make way for a newer version, then with Visual Studio 2008 (Orcas) the above may be somewhat familiar. Surprisingly, the answer is to install the latest version of the Silverlight Tools here: http://www.microsoft.com/downloads/details.aspx?FamilyID=b52aeb39-1f10-49a6-85fc-a0a19cac99af&DisplayLang=en That may not be the only answer, but it seems to have worked for a number of people including me. If you are having trouble uninstalling Visual Studio ORCAS because the MSI information got clobbered somehow, or it reports not being able to find some "network location" (DOH), one of the fastest ways to clean things up is to use some of the tools out there, many of which have been provided by installation guru Aaron Stebner. Here's a post by Brad Abrams that highlights two tools you can use. MSIInv takes an inventory of all your MSI-installed software (even stuff you cannot see in Ad

Losing ASP.NET Sessions - Why Application Pools recycle

I've seen a more or less constant stream of questions on the asp.net newsgroup and the asp.net site forum messageboard, all of which revolve around the problem of "Why am I losing Sessions?". (BTW that is "losing" with one o, not "loosing"! Your pants might be loose , but if your Session goes away you can bet that you are losing it!). Heres a summary of what I've learned about this; comments and additions are always welcome: If your ASP.NET application crashes, has an unhandled exception, hangs or otherwise becomes brain-dead, it will cause the application pool to recycle. Sometimes your application pool recycles for no obvious reason. This is usually a configuration issue or it may be caused by your app performing file system operations in the application directory. Many times developers incorrectly set up SqlConnections so that they aren't properly closed and returned to the connection pool, and this can also cause your AppPool to recycle un

AJAX: Enough Already!

Image
Is there such a thing as OverAJAXification? From the AJAX Sucks Department... Jeesh. Everybody and their brother is sticking AJAX into their "stuff" - whether it's appropriate or not. They just did it at Codeplex.com. The search facility was just fine. You'd click a "next" link and the page would postback and right away you would get to see the next page of results. Now, since they've supposedly "souped it up" with AJAX, what you get is a very long (sometimes 5 seconds or more) grey screen with an "updating" in-your-face graphic to look at, and then finally you get to see your next page of search results. To me, that's a lot more annoying and disruptive to the user experience than the slight flicker of a quick postback. But often, instead, you may just as well see the above Sys.WebForms.PageRequestManager exception dialog, which does absolutely NOTHING to improve the user experience. Oh, and while I'm ranting, here's anot

Vista Upgrade: DVD Driver Problems FIX - Roxio DLA

The gods too are fond of a joke. - Aristotle Recently I upgraded XP Pro to Windows Vista Ultimate. It wasn't until sometime later that I found I had lost my DVD drive. The driver appeared in Device Manager but it had that familiar yellow exclamation mark indicating a problem loading the driver. After a bit of searching, I discovered that the culprit was Roxio CD/DVD software (e.g., "DLACDBHM.SYS" et. al.) which is not Vista - compatible, and thus blocks correct loading of the built in Vista CD/DVD drivers. The FIX: First step, in C:\Windows\System32 you need to find the DLA folder and delete it. That's their "Stuff". If you want to get sophisticated, you can search the registry for all keys that point to any of these .sys drivers and remove the entries. Next, run this Registry Fix script courtesy of Doug Knox: 'Restore CD-Roms and DVD's to Explorer 'xp_cd_dvd_fix.vbs '© Doug Knox - rev 04/14/2002 'Downloaded from www.dougknox.com 'ba