If you use URL rewriting in your ASP.NET apps you’re probably familiar with the workarounds required to get your rewritten URL to show up in the action attribute of the form on your pages (see ScottGu’s ‘Handling ASP.NET PostBacks with URL Rewriting’). Well, no more.
Included in the latest ASP.NET Service Pack is this gem (via Scott Hanselman):
HtmlForm.Action is now settable - Again, subtle, but very cool. I like to use URL rewriting a lot and want my <form action=”"> to be a certain way. Now I can set it manually without fooling around with RegEx’s and messing with the whole response.
Woot! I deleted my FormRewriter.cs control adapter and .browser file then added this little snippet to my common BasePage (you can do this in either Page_Init or Page_Load on individual pages) and now my form action attributes reflect the original URL.
// header is created by Ionic’s ISAPI Rewrite Filter (IIRF) string u = Request.Headers["X-Rewrite-Url"]; if (!string.IsNullOrEmpty(u)) { Form.Action = u; }
I support a lot of large Classic ASP sites written years ago and every once in awhile they get hit with SQL Injection attacks. I grep through the log files, find out where they got in and patch it up and any other places where the same code is used. One site I’ve probably audited five times but it seems like I always miss a hole.
The HP Security Laboratory released a new piece of free (as in beer) software today called Scrawlr that scans your site and finds any openings. I ran it on a few of the sites I support and it found a couple more holes that when I looked at them, weren’t obvious injection points. The sites are all patched up now and I can sleep again.
I use Grisoft’s AVG Free on my home computer for anti-virus. I’ve been using it for a few years and have been pleased with it. It doesn’t have a noticeable performance penalty and it generally stays out of the way. They’ve recently discontinued version 7.5 and have replaced it with 8.0, which is still available for free (although, they’re starting to be more discreet about that).
AVG 8.0 includes a new IE add-on called LinkHelper. When you do a Google search, it checks each link in the results and presents you with some icons indicating whether or not the site listed is safe.
This is great for my mom, but I don’t like to run any unnecessary browser add-ons. IE doesn’t need any help being more unstable. I figured I’d just disable it, but it’s not that straightforward. I went in and disabled it in the AVG options. This got rid of the icons in IE, but now AVG warns you via the tray icon that there’s an error. If I left it like this and there actually was an error, at a glance I wouldn’t know.
Disabling LinkScanner also does not unload the IE addon. So here’s my workaround. Enable LinkScanner in AVG, but then unload the browser addon manually:
AVG still thinks LinkScanner is loaded, but it’s not. You can now search the Googles uninterrupted.
Before anyone responds to this by saying "Switch to Firefox" let me preemptively respond to that. First off, I like Firefox just fine and have nothing against it. The reason I use primarily use IE is because the large majority of the people that use the web sites I build still use IE. If I don’t feel their pain, I find myself ignoring them. Using IE keeps me in touch with my users.
I’m headed to Silicon Valley this weekend for Startup School featuring Bezos, DHH, Buchheit, Graham, Andreessen, Arrington and many more. If you’re so inclined, you can follow my trip on Twitter.
I have no data to back this up, but everything feels snappier. Not just script performance but page rendering as well. Opening a new tab is still way too slow. It needs to be near instantaneous.
Bookmarks bar is improved
I’ve always been a big Links toolbar user keeping all my most frequently visited pages quickly accessible. The new Bookmarks bar takes the old Links bar and kicks it up a notch with WebSlices integration.
I never liked how IE7 took up valuable space on the tab strip for the favorites UI. Now that’s been moved to a more logical place on the Bookmarks bar.
Emulate IE 7 mode is handy
Finally a suitable solution to the perpetual issue of not being able to run two different versions of IE concurrently.
New features have potential to be very useful
WebSlices (basically chunks of a web page that you can quickly view from the Bookmarks bar) are neat and I can definitely see some potential uses (the eBay example from the MIX keynote today would definitely be one).
Activities has a lot of potential too although the right click context menu is getting to be a little crowded.
New developer tools are on the right track
They’re not quite FireBug yet, but they’re definitely a step in the right direction. What needs to happen to make it better? Make it exactly like FireBug!
Address bar text coloring is weird
IE8 highlights the current domain and dims the rest of the URL. Not sure that this is helpful for anything. I think this is going to bother the folks at site like ESPN:
Why the permanent horizontal scroll bar?
This is the only curious change I’ve seen and I’m hoping its a bug. The horizontal scroll bar is now permanently visible even when you can’t scroll side to side. I like having the permanent vertical bar to keep my layouts from jumping around but the permanent horizontal bar doesn’t solve any issues that I know of. I’d like to know the reasoning behind this.
Add-on manager is greatly improved
Extensions, search providers and activities are all managed from one place. It’s very well organized.
Few new options
A quick look through the Internet Options didn’t turn up anything that stands out. I’m shocked (and thankful) that most of what they’ve done appears to be under the hood (rendering, script perf, etc) with only a few new features. Let’s hope it stays this way until release.
Automatic properties are nice, but sometimes you just want a good ol’ regular property with a backing field. Visual C# 2005 had the ‘prop’ code snippet which generated this:
Visual C# 2008 now generates the following when using the ‘prop’ snippet:
I find myself wanting to use the old snippet more than the new one, so I went into the 2005 code snippets, copied the ‘prop’ snippet file, made a few changes and imported it into 2008 (Tools | Code Snippets Manager | Import).
Visual Studio feature request o’ the day: ‘Surround With’ in the HTML editor (highlight some HTML, hit Ctrl-K, Ctrl-S, type an HTML tag like ‘div’, press enter). Anyone know if this exists or not? How difficult would it be to write a VS add-in to make it happen?
Lately (while not blogging) I’ve been thinking of things I’d really like to blog about but haven’t made the time for. Here they are:
jQuery I hate JavaScript. jQuery changes everything though. I can actually be a functional JavaScript programmer. I particularly like how you can attach events without overloading your code with onclick="" everywhere. I got hooked on jQuery for UI bits (especially the tablesorter and tabs plugins), but I’m becoming obsessed with it because of the sweet Ajax functions. jQuery + ASP.NET AJAX PageMethods is teh awesome (minus the HUGE ASP.NET AJAX script handlers). I’ve also been pondering using jQuery for a light-weight faux-UpdatePanel setup (similar to this). You may hear more about this in the future.
SubSonic I can’t really add anything to the SubSonic conversation that you probably haven’t heard before so I’ll keep this section short. The unofficial MVC templates have made their way into a ton of my projects. I’m psyched for version 2.1 codename "Pakala" and the new, officially-supported Repository Pattern to replace the MVC templates.
Flee I have an extremely fun project that’s heavily using Flee but unfortunately, that’s still under wraps for the time being.
Super Mario Galaxy You can’t work all the time! This is the most fun I’ve ever had playing a game. I usually stick to sports games, but this game is incredible. It will redefine what you know about Mario and platformers.
Jing Project I can’t believe I hadn’t heard about this before today. I was looking for a way to more easily take screengrabs (without spending any money) when I came across TechSmith’s Jing Project. Jing is a dead simple way to share screengrabs and even simple screencasts. The interface is exceptional and the service works great from capture to uploading. Here’s hoping they keep it free!
MozyPro Cheap, instant off-site back up. Takes the work out of backing up.
I’ve started up a blog to cover the intersection of sports and technology called (wait for it, this is good) SportsTechBlog.com. I’ve been running this blog for awhile through The Press Box on my RIM Systems site but now I’ve decided to spin it off into its own site. Check it out and let me know what you think!
I’ve been running VS2008 Pro Beta 2 for awhile and had mostly good luck with it. There were only two recurring bugs that got to be annoying. The first was that after typing CssClass or class in the HTML source editor and hitting ‘=’ the automatic quotes (which I enabled in the settings) would be doubled so auto-complete would generate CssClass="""" instead of CssClass="". I found the bug in Connect and MS said it would be resolved in RTM.
The other bug popped up when I double-clicked a .aspx file in the solution explorer while the corresponding .aspx.cs file was already open. I’d get an "This document is opened by another project." error dialog but the file would open normally. I never took the time to track that bug down in Connect.
Today I download the RTM bits and the first bug still exists in a way. Now I don’t get any automatic quotes (I doublechecked that its enabled) for CssClass/class. So now on auto-complete I get CssClass= or class=. All other attribute names generate the auto quotes, even nonsense words. I reset my Visual Studio settings to the defaults and I still get the error.
As for the second bug, it still exists. I thought it might be VisualSVN causing it but the dialog title is "Microsoft Visual Studio" and it happens with web sites that aren’t in SVN.
Neither bug is a showstopper, but they are very aggravating. Is anyone else experiencing these issues?
UPDATE: The first bug only happens if you have no styles defined in your document or a linked stylesheet OR if VS hasn’t yet parsed your linked styles (it can take a few seconds after loading a document). Still annoying if you’re working on a new document and haven’t defined any styles yet. The second bug appears to be an issue with one of my add-ons as I was unable to replicate it on another machine. I don’t know which add-on yet.
UPDATE 2: MS was able to replicate the first bug and is going to fix it for a future release (thanks to the guys on the Web Dev Tools team for their quick and helpful responses!). After uninstalling all my add-ins, I narrowed the second bug down to VisualSVN and have contacted them to let them know.