Before I get to the "begging for help" part, let me quickly tell you who I am:

  • I'm a Senior Web Developer for a relatively large company. I use Visual Studio 2008, connect to SQL Server 2005, and use IIS6 on Server 2003.

  • I own two copies of Visa Ultimate Edition (one for my Tablet PC, one for my Media Center server).

  • I've had Windows Mobile devices since I replaced my Newton MessagePad 130 with a Casio Palm Sized PC (and currently have an AT&T Tilt).

  • I was an early adopter of the XBOX Original.

  • I bought one of the first Zune's to market.

  • I use BlogEngine.NET to run my personal blog, and SharePoint 3 for my family portal.

  • In short, I'm a Microsoft supporter through and through.

...

More  at source: http://blog.joelevi.com/post/2008/04/Open-Letter-to-Microsoft-about-my-XBOX360-Failure.aspx

Register.com will charge you, what, $35/year to register a domain name with them. Other domain registrars like GoDaddy are less than $10.

registeremailWhy everyone doing business with Register.com hasn't jumped ship is entirely beyond me. I jumped years ago.

Today I got an email from register to "get big business email for a small business price."

They say "D. Joseph.Levi@thebiglerfamily.com" beats "joe (at) joelevi.com"

What?! I'm Joe, my website is JoeLevi.com, but for some reason my full name (with a space in it? I didn't think that was legal in a properly formatted email address) at some other domain that I registered for a client beats my "me at my site" address? Really?

Wow.

First of all, I really don't like MSIE7's rendering mode, but it is better than that of MSIE6.

MSIE8 (Beta 1) is expected to ship in "standards mode" by default, in other words, "not compatible with MSIE7 pages mode." That could be a problem.

I use Yahoo!'s YUI CSS libraries to "zero out" all the discrepancies between browsers so I have a clean slate on which to build. Most of the time it works pretty well -- until MSIE8.

Even in "standards mode" MSIE8 renders my pages MUCH differently than MSIE7, Firefox 2/3, and Safari 3. Why? No idea yet. In the meantime, here's how to make your pages load the same way in MSIE8 as they did in MSIE7.

Add the following meta tag to your header:

<meta http-equiv="X-UA-Compatible" content="IE=7" />

Common Name Compatibility Mode Value
"Quirks" Mode IE=5
IE7 Mode IE=7
IE8 Standards Mode IE=8
Always Use Latest Mode IE=edge

Of course that's not the "fix" but it will get you by until you can get to the root of the problem.

You can thank me later.

Recently we started getting the following error message on our ASP.NET 2.0 web application running on IIS6.

  • Exception type:
    • CryptographicException
  • Exception message:
    • Padding is invalid and cannot be removed.
  • Stack trace:
    • at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
    • at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
    • at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
    • at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo)
    • at System.Web.UI.Page.DecryptString(String s)
    • [...]

The application provides forms authentication as the login mechanism for the end-user.

Apparently, whilst tuning the IIS settings for the application's App Pool (we forgot to set the max CPU use) we inadvertently turned on Web Garden and increased the "Max number of worker processes" from 1 (default) to 2.

Doing this created an unhandled problem, forms authentication uses the worker process to create an encrypted login chunk in the site's cookie. The encryption is specific to the worker process (even if it's on the same box). Therefore, if your user logs in using one worker process, then is shifted to another worker process, their login (as stored in the cookie) is invalid and they are prompted with to re-authenticate (which will be valid until they are shifted from that worker process to another).

There are ways to handle this, of course, so the user can hop between worker processes (or even entirely different servers) and still maintain a valid, authenticated session. But for us, we just set the worker processes back to 1 and restarted the app pool and all was well.

You can thank me later.

"It says here that you're a professional 'booger?'" "Blogger."

That's the punch line from a comic at blaugh.com. Those of you have been following my posts for a while know that I've just been some guy on the Internet posting "stuff" from my life that I hope someone else out there will find helpful. I run ads and have a PayPal donation link if you want to shower me with money, but I've never done any of that to make money, more to just break even.

Well, today I'd like to officially announce, I've added the title of "Professional Blogger" to my resume' as I'm one of the bloggers on Lifetime Products new blog: Lifetime365. And no, I didn't pick the color scheme, and yes, it hurts my eyes when I look at it, too. Thank goodness for RSS Feeds!

 

 

I'll be cover MIX08 day by day, session by session over at my other blog, head over there for all the details: http://blog.joelevi.com/?tag=/mix08

Even the world's best blog is nothing if no one can find it. Making sure your pages are indexed by search engines (and optimized for that purpose) is a good start, but you need to let some other guys know, too. Those guys are known as ping servers.

 

Basically, when you post a new article you "ping" these servers with the address (permalink) of your new post, they then schedule a crawl to include your new post in their database, which is then spidered by others, including search engines.

So, how do you do this? You can do it manually, or you can add a list of ping servers to your blogging engine (most engines support this).

Here's my list:

http://rpc.technorati.com/rpc/ping
http://rpc.pingomatic.com/
http://api.feedster.com/ping
http://api.moreover.com/RPC2
http://api.my.yahoo.com/RPC2
http://xping.pubsub.com/ping/
http://ping.blo.gs/
http://ping.feedburner.com
http://ping.syndic8.com/xmlrpc.php
http://ping.weblogalot.com/rpc.php
http://rpc.blogrolling.com/pinger/
http://rpc.icerocket.com:10080/
http://rpc.newsgator.com/
http://rpc.weblogs.com/RPC2
http://topicexchange.com/RPC2
http://www.blogdigger.com/RPC2
http://www.blogstreet.com/xrbin/xmlrpc.cgi
http://www.newsisfree.com/RPCCloud
http://ping.weblogs.se/
http://blogmatcher.com/u.php
http://coreblog.org/ping/
http://www.blogpeople.net/servlet/weblogUpdates
http://bulkfeeds.net/rpc
http://trackback.bakeinu.jp/bakeping.php
http://ping.myblog.jp
http://ping.bitacoras.com
http://ping.bloggers.jp/rpc/
http://ping.blogmura.jp/rpc/
http://xmlrpc.blogg.de
http://1470.net/api/ping
http://bblog.com/ping.php
http://blog.goo.ne.jp/XMLRPC
http://api.feedster.com/ping.php
http://api.moreover.com/ping
http://api.my.yahoo.com/rss/ping
http://bitacoras.net/ping
http://blogdb.jp/xmlrpc
http://mod-pubsub.org/kn_apps/blogchatt
https://phobos.apple.com/WebObjects/MZFinance.woa/wa/pingPodcast
http://ping.amagle.com/
http://ping.cocolog-nifty.com/xmlrpc
http://pinger.blogflux.com/rpc/
http://ping.exblog.jp/xmlrpc
http://pingqueue.com/rpc/
http://ping.blogg.de/
http://ping.rootblog.com/rpc.php
http://rcs.datashed.net/RPC2/
http://rpc.blogbuzzmachine.com/RPC2
http://rpc.britblog.com/
http://rpc.tailrank.com/feedburner/RPC2
http://rpc.wpkeys.com/
http://services.newsgator.com/ngws/xmlrpcping.aspx
http://signup.alerts.msn.com/alerts-PREP/submitPingExtended.doz
http://www.a2b.cc/setloc/bp.a2b
http://www.bitacoles.net/ping.php
http://www.blogoole.com/ping/
http://www.blogoon.net/ping/
http://www.blogroots.com/tb_populi.blog?id=1
http://www.blogshares.com/rpc.php
http://www.blogsnow.com/ping
http://www.holycowdude.com/rpc/ping/
http://www.lasermemory.com/lsrpc/
http://www.imblogs.net/ping/
http://www.mod-pubsub.org/kn_apps/blogchatter/ping.php
http://www.newsisfree.com/xmlrpctest.php
http://www.popdex.com/addsite.php
http://www.snipsnap.org/RPC2
http://www.weblogues.com/RPC/
http://bulkfeeds.net
http://thingamablog.sourceforge.net/ping.php
http://pingoat.com/goat/RPC2
http://xmlrpc.blogg.de/
http://zing.zingfast.com
http://blogbot.dk/io/xml-rpc.php
http://www.catapings.com/ping.php
http://effbot.org/rpc/ping.cgi
http://rpc.wpkeys.com
http://rpc.britblog.com
http://ping.fakapster.com/rpc
http://pinger.blogflux.com/rpc
http://blogsearch.google.com/ping/RPC2
http://rpc.icerocket.com:10080
http://rpc.pingomatic.com
http://blogupdate.org/ping/
http://www.feedsky.com/api/RPC2
http://bitacoras.net/ping/
http://rcs.datashed.net/RPC2 euro.weblogs.com
http://www.bitacoles.net/notificacio.php
http://ping.blogoon.net/
http://www.weblogues.com/ping/
http://blo.gs/ping.php
http://www.weblogalot.com/Ping/
http://www.packetmonster.net/xmlrpc.php
http://blogsearch.google.com/ping
http://www.blogupdate.org/ping/
http://blogupdate.org/sverige/ping/
http://rcs.datashed.net/RPC2
http://ping.feeds.yahoo.com/RPC2/
http://www.syndic8.com/xmlrpc.php
http://pingoat.com/
http://www.mod-pubsub.org/ping.php
http://www.weblogues.com/RPC
http://rpc.odiogo.com/ping/
http://www.bloglines.com/ping/
http://api.feedset.com/ping
http://rpc.pingomatic.com/RPC2

I've recently renewed my effort to "use the right tool for the job" when developing xhtml and CSS, which got me to thinking. If using a <ul> rather than a <div> is better in a certain application, are there better ASP.NET tools for other jobs?

With that mindset I came across a task that required connecting to one of our databases. Rather than building a DAL (and no, I'm not LINQified yet) I decided to just grab the data though a SqlConnection and go from there. So far so good. I then was faced with how to "deal" with the stuff returned from the SqlCommand. Here ASP.NET has a couple controls that do can read the data from your SqlCommand: DataReader and DataSet. But which to use?

I've always been partial to using what you know, and knowing what you use. So for almost all my cases I've used the DataSet control. This has allowed me to not only get stuff out of a database, but update and insert stuff as well. In those cases, DataSet is ideal. But, with all that extra functionality comes extra overhead.

DataReader, on the other hand, doesn't "do everything for you" and then some. It does its job, and does it well, and doesn't do anything else (sound like a UNIX concept, doesn't it?). With DataReader you are doing just that, reading the data from the database, and handling it (parsing it into an object, writing it onto the page, etc.), and closing the SqlConnection.

4GuysFromRolla describe the DataReader thusly:

"[...] the DataReader is just a ferry of data between the application and database. [...] Furthermore, a DataReader is limited to being read-only and forward-only. That is, the information retrieved from the database cannot be modified by the DataReader, nor can the DataReader retrieve records in a random order. Instead, a DataReader is limited to accessing the records in sequential order, from the first one to the last one, one record at a time."

Wow, that seems awfully limited, doesn't it? If you want to do updates and inserts, sure. If you're only grabbing data from your database, DataReader is most likely the ideal tool for the job: Open the connection, grab the data, handle it, and close the connection. And that's where DataReader really shines; check out the graph. As far as graphs go, it doesn't get more dramatic than that. Even at 100 records being returned, the results are alarming, up that to 1,000 records and you can easily see why you'd want to use a DataReader over a DataSet (again, unless you need the added features that DataSet gives you).

You can read more (and dig into the minutia of the test results) at 4GuysFromRolla.

In ASP.NET 1.1 it was a pain to maintain the position of the scrollbar when doing a postback operation.

In ASP.NET 2.0 and above you can simply add the MaintainScrollPostionOnPostBack attribute to the Page directive of any specific page:

<% Page Language=”C#” … MaintainScrollPositionOnPostback=”true” %>

If you would like to apply this behavior to your entire site simply modify the <pages / > entry of your <system.web /> section in your web.config file like so:

<pages maintainScrollPositionOnPostBack="true">

You can thank me later.

 - www.JoeLevi.com 

For a good long time we developers have been using Arial as the default font that we've used for all of our san-serifed needs, most of us too young to know why, or where it came from.

Arial is a hybrid between Helvetica and Grotesque, which mimics the same weight and dimensions of Helvetica, but using many of Grotesque's "parts" (for lack of a better word).

Arial (and all of its copycat brothers) came from Helvetica having been built into the firmware of printers, and needing something that could be "swapped out" as an equivalent. Arial is not alone in its copycatting of  Helvetica, many others did it so they wouldn't have to pay fees to license Helvetica. One of the benefactors of Arial was a little company known as Microsoft.

Bundled with Windows and every version of Microsoft Office (including those for Mac), Arial soon became the font to use, even though it's arguably not as nice as Helvetica. Even Yahoo! with their YUI 2.4.1 uses Arial preferentially over Helvetica in their fonts.css file.

I argue that Helvetica is better than Arial, and Arial is simply a "knocked off" version of Hevletica, and not an improvement. Therefore, YUI (and your stylesheets) should reflect this accordingly, as such: font-family: helvetica,arial,clean,sans-serif;

That having been said, there are fonts that have theoretically improved over basic Helvetica and Arial for on-screen readability. Verdana, Tahoma, and Calibri, for example, could be argued to be improved and designed specifically for use on monitors and other displays (rather than the printed page, as was the media that Helvetica and Arial were designed).

Thoughts? 

More Posts