Scott Hanselman

BUG?: Can't use an Asterisk (*) as a character when requesting a URL (page) from ASP.NET

January 26, 2005 Comment on this post [8] Posted in ASP.NET | DasBlog | HttpModule | Bugs
Sponsored By

File this in obscure. I'm trying to fix a bug filed against dasBlog where the guy has a Category in dasBlog called "WS-*"

He filed a bug saying that the CategoryView doesn't work, presumably because it has an asterisk. Now, I KNOW asterisks are allowed in values of querystrings, so this seemed weird to me.

Turns out he's using the UrlRewriting feature of DasBlog so he gets URLs like this:

http://localhost/DasBlog/CategoryView,category,WS-*.aspx

The idea is to fool search engines into thinking there are actual pages, instead of one page with an URL like:

http://localhost/DasBlog/CategoryView.aspx?category=WS-*

Here's where it gets weird. We use a thing called the UrlMappingModule to catch ALL requests (all the requests that are handled by ASP.NET) and then call app.Context.RewritePath(newPath) which routes, in this case, the request to CategoryView.

However, if an asterisk (*) appears anywhere IN THE (purported) FILENAME, ala CategoryView,category,WS-*.aspx then ASP.NET never hears about it, the HttpModule's BeginRequest never fires and I can't do crap about it. All I see is an HTTP 400 Bad Request.

So, without digging further, I can only assume that the ASPNET_ISAPI extension didn't think it was cool to pass the request on. Of course, when the * appears as a value int the QueryString, everything is cool.

What other component/filter/module upstream might be slapping this request down? I'm not running any thing special on this development box.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

IMAP vs. POP3 in Outlook 2003

January 24, 2005 Comment on this post [17] Posted in Musings
Sponsored By

I use Outlook 2003. We run it at work, and I use it at home. I've been an Outlooky guy since '97, even though it wasn't until 2003 that it didn't suck completely.

I've got a Desktop at home, a Laptop at work, and my TabletPC for on-the-side writing gigs. Since I have only one email address (my first name @ my last name.com) and I will NEVER change it, it's fairly important to me. It's my personal email. I know some folks out there (RichC) have 50 emails like receipts@hanselman.com or someclassIamtakingatcommunitycollege@hanselman.com. But, I just don't like it.

I'm home and work. One email for each. For home, I use POP3 email. I've got email going back to 1989 imported into my Outlook PST. I don't save attachments in the PST because of the 2 Gig limit. Anyway, the Home Desktop is "authoritative." It's on a RAID Array, Backed up to the REV daily, another External HD weekly, and Optical monthly. This means that while I download email on the other machines, I don't "care" about those "versions" and I leave "Leave Mail At Server" turned on everywhere. I use OddPost.com for reading my email everywhere else. 

So, my question is, after all these years: Should I switch to IMAP?

  • Would the ISP become "authoritative"?
  • Would I want to upload the whole archive?
  • Or, do I use IMAP for my Inbox only? and move things around from there?
  • How would I back it up?
  • What if I switched ISPs?
  • How is the Outlook support for IMAP? I heard bad things...
  • Would IMAP be better for my Mom's email?
  • Everyone SAYS IMAP is better...what are the secret CONs that no one mentions?

Oh, experienced emailers...guide my decision!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

The Charity Auction has Begun: Bid on an Hour of .NET Consulting Time to help Banda Aceh

January 22, 2005 Comment on this post [6] Posted in ASP.NET | INETA | Learning .NET | Web Services | DasBlog | XML
Sponsored By

The link is live 9am EST Sunday, spread the word!

.NET Charity Auction - http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=5552696499 

 

This auction is a charitable contribution. Winners will pay for an hour each of .NET consulting time to benefit the Tsunami victims of Banda Aceh.  ALL of the money will go to help the victims (tax benefit for you as well). ALL eBay fees are going to be paid by thinktecture (http://www.thinktecture.com/) an European consulting firm.

 

Bid for an hour of a .NET Celebrity Consultant’s time. Winners can pick the brain of a .NET Expert for an hour (highest bidders will be first in the “draft” for the consultant assigned to them). Winners can call, email or IM the consultant and use the hour to answer that nagging question, do a code review, or just get some general .NET advice.

There will be 30 winning bids. eBay rules require that all 30 winners pay the lowest bid price. So you are required to pay the lowest bid amount, but are encouraged to pay for your final bid (we will invoice you for both, it is your choice how much you want to donate to IDEP (payments via PayPal)). Here are the participants we have RDs and INETA speakers from all 6 continents and 12 countries!

We've added even more consultants for you to bid on!

Michelle Leroux Bustamante, Kimberly L. Tripp, Jonathan Goodyear, Andrew Brust, Richard Campbell, Adam Cogan, Malek Kemmou, Jackie Goldstein, Ted Neward, Kathleen Dollard, Hector M Obregon, Patrick Hynds, Fernando Guerrero, Kate Gregory, Joel Semeniuk, Scott Hanselman, Barry Gervin, Clemens Vasters, Jorge Oblitas, Stephen Forte, Jeffrey Richter, John Robbins, Jeff Prosise, Deborah Kurata, Goksin Bakir, Edgar Sánchez, Thomas Lee, J. Michael Palermo IV, Vishwas Lele, and John Lam

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Own a LinkSys WRT54G? Sveasoft released Alchemy v6.0RC6 and I HAD to install it at 2am

January 22, 2005 Comment on this post [10] Posted in Gaming | Tools
Sponsored By

Shoot, who DOESN'T have this router? Seems like the LinkSys WRT54G is ubiquitous these days.  Greg Hughes turned me on to this little $99 gem, and while I have a love-hate relationship with it (and Greg :) ) I have stuck with it.

I just noticed on LinkSysInfo that "Sveasoft has released a new release candidate for alchemy v6.0RC6, This firmware is for WRT54G v1.x and v2.2 and WRT54GS 1.0 and v1.1 models."

The deal is this, you paypal Sveasoft US$20 every year and they continue to improve the LinkSys firmware under the GPL. This little LinkSys is just a firmwarey Linux Box and god-forbid we should leave the default software on it! :) If you are too cheap for $20 there are free public versions you can run also.

There are a number of Firmwares available from Sveasoft under various code names. The ones you should know about are:

  • Satori - This is the current stable/public release. It includes bandwidth management and VPN support along with a host of other good things. You can download this for free and mess around.
  • Alchemy (Alchemy-6.0-RC6 v3.01.3.8sv) - The current pre-release available to subscribers. It has a fantastic QoS interface (Quality of Service) to guarantee bandwidth by MAC, by IP Port, by protocol or by RJ45 port! It supports local DNS caching (DNS MASQ), UPnP (for seamless XBox support), Port Forwarding (so my two ReplayTVs can talk to Poopli), as well as the dubious ability to increase the milliwatt output of your Wireless router by 900%. This can make the wireless signal a lot more realiable if you're on the back porch if you know what I mean.

Good Things:

  • QoS: I'm using it with Vonage and have been able to easily setup a Static IP in DHCP to be assigned to my Vonage Router via MAC address. Then I went into the Sveasoft Quality of Service interface and set Vonage to be at the "Premium" level. This means that bits going to and from my Vonage Router have PRIORITY. I tested this by downloading a 3 GIG file from Microsoft via FTP while the wife was on the phone. I've got 3 megabits downstream, so I get about 300-350K/sec down. When QoS was off, Mo could barely hear your sister and the digital artifacts sent here directly to me to complain. When QoS is on, Mo hasn't once mentioned any trouble with Vonage sound quality.
  • Port Forwarding: I've always found this to be hard to configure and a tricky thing. However, once you know what IPs each machine is on via static records in DHCP (rather than plain old static IPs which are hard to keep track of and configure) the Sveasoft interface makes it easy. I 'opened up ports' for Vonage and my two ReplayTVs, as well as the XBox for good measure (I know it's not required.)

Bad Things:

  • Flakey: This is a flakey router. I have to reboot it once or twice a month. Also, when I flashed it this evening with the new Alchemy build (I was upgrading from Satori) I had to hold the reset button for like two minutes. Also, the power light wouldn't stop flashing (a bad thing) until I disconnected and reconnected the Internet cable (a weird thing) then everything started working again (a good thing.)
  • I'm Not Smart On These Things: I got an 'A' in TCP/IP class and I can run Ethereal with the best of them, but I don't understand how the Linux TCP/IP stack is organized and I can't calculate NetMasks without scratch paper and I don't have my 128-bit WEP keep memorized, so I feel stoopid when I read the Support Forums on Sveasoft.
  • You CAN Screw Yourself and Your Router: Greg has messed his up during the firmware flashing process a few times. When that happens you sometimes have to open the router up and fiddle with dips or something. I haven't messed it up that bad, but I've gotten close. You should always have a default LinkSys firmware already downloaded as it sucks to have no Internet Access and the tool you need isn't already on your system. There's five second window of time on bootup when you can re-flash an older firmware via TFTP.

Thank God I got this working again before Mo wakes up. Having no email is bad, but having no phone service is a problem.

All that said, I'm digging it. Chris Brooks is running it now I believe, as well as Greg Hughes and (I think) Chris Sells without any screams of pain.

Do you run Sveasoft or the default firmware?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Parsing my IIS Log Files with LogParser 2.2 to learn more about Blogs stats from NewsGator and NewsGatorOnline

January 21, 2005 Comment on this post [5] Posted in ASP.NET | XML | Tools
Sponsored By

LogParser is pretty slick. It's wicked hard to learn, in my opinion as I'm not very SQL-y, but it's still awesome. Here's the marketecture description:

Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows® operating system such as the Event Log, the Registry, the file system, and Active Directory.

There's a unofficial support site at LogParser.com which makes me respect the tools usefulness even more. Not even unsupported Microsoft tool has it's own unsupported support site supported by MikeG.

It's not only cool because it's a super-psycho command-line tool, and we all know how I love those. But, it's also got a COM Interface so it programmable/scriptable as well.

So, long story short, I noticed recently that GregR over at NewsGator said that he's including subscriber statistics in the NewsGatorOnline User-Agent. Now, I'm not sure what I think of tunnelling information like that in such an odd place, but what do I know? The idea is clever as hell.

I decided this was a good time to learn how to use LogParser. I grabbed a 20-Meg IIS log file from my ISP from a random day last week and setup some queries. Here's what I did in about 5 minutes.

C:\Program Files\Log Parser 2.2>LogParser.exe -i:IISW3C "SELECT COUNT(cs(User-Agent)) AS Client FROM c:\temp\ex050120.log WHERE cs(User-Agent) LIKE 'NewsGatorOnline%' "
Client
------
134

Statistics:
-----------
Elements processed: 90386
Elements output:    1
Execution time:     3.71 seconds

So, if I'm understanding this correctly, NewsGatorOnline's Aggregator hit me 134 times this particular day. What's my number of NewsGatorOnline Subscribers?

C:\Program Files\Log Parser 2.2
>LogParser.exe -i:IISW3C "SELECT DISTINCT cs(User-Agent) AS Client FROM c:\temp\ex050120.log WHERE cs(User-Agent) LIKE 'NewsGatorOnline%' "
Client
---------------------------------------------------------------
NewsGatorOnline/2.0+(
http://www.newsgator.com;+2+subscribers)
NewsGatorOnline/2.0+(
http://www.newsgator.com;+1+subscribers)
NewsGatorOnline/2.0+(
http://www.newsgator.com;+250+subscribers)
NewsGatorOnline/2.0+(
http://www.newsgator.com;+15+subscribers)
NewsGatorOnline/2.0+(
http://www.newsgator.com;+249+subscribers)

Statistics:
-----------
Elements processed: 90386
Elements output:    5
Execution time:     3.67 seconds

Now, I don't know if I'm doing this right, but I'm not sure what I'm being told here. Either I'm doing this query wrong or Greg's stats are off. I'd expect the number of subscribers to be constant or change +/- a few a day.

UPDATE: I realized this on the way home and GregR emailed me to remind me, each distinct RSS Url is tracked by NewsGator. So my ATOM Feed and my Category Specific Feeds each have their own statistics.

This is just NewsGatorOnline folks. I also run queries on actual NewsGator Add-In users for both version 1.0 and 2.0. (I'm sure there's a way to do it all in one query, but again I'm not SQL-y.

C:\Program Files\Log Parser 2.2>LogParser.exe -i:IISW3C "SELECT DISTINCT COUNT(c-ip) AS Client FROM c:\temp\ex050120.log WHERE cs(User-Agent) LIKE 'NewsGator/1%' "
Client
------
25

C:\Program Files\Log Parser 2.2>LogParser.exe -i:IISW3C "SELECT DISTINCT COUNT(c-ip) AS Client FROM c:\temp\ex050120.log WHERE cs(User-Agent) LIKE 'NewsGator/2%' "
Client
------
4874

I thought this means I have around 25 distinct IPs using NewsGator 1.x who hit my site that day and about 4874 using NewsGator 2.0. But, that seems like WAY too many people subscribed to my site with just NewsGator. So, I changed the query:

C:\Program Files\Log Parser 2.2>LogParser.exe -i:IISW3C "SELECT COUNT(DISTINCT c-ip) AS Client FROM c:\temp\ex050120.log WHERE cs(User-Agent) LIKE 'NewsGator/2%' "
Client
------
385

THAT'S more like it. 385 distinct IPs using NewsGator 2.x hit my site this particular day. As an aside, there are actually 2 people using NewsGator 1.x. Cool. I need to spend more time understanding this tool. I believe I can ask it more complicated questions about my site than something like LiveStats, and I could set it up to email me charts or stats, or create an ASPX page for blog-specific reports.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.