| | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| 24 | 25 | 26 | 27 | 28 | 29 | 30 | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | | 8 | 9 | 10 | 11 | 12 | 13 | 14 | | 15 | 16 | 17 | 18 | 19 | 20 | 21 | | 22 | 23 | 24 | 25 | 26 | 27 | 28 | | 29 | 30 | 31 | 1 | 2 | 3 | 4 |
Subscribe to this feed:
|
|
Archives:
| May, 2010 (1) |
| March, 2010 (1) |
| November, 2009 (1) |
| September, 2009 (1) |
| July, 2009 (2) |
| June, 2009 (1) |
| May, 2009 (1) |
| March, 2009 (5) |
| February, 2009 (3) |
| July, 2008 (1) |
| June, 2008 (2) |
| May, 2008 (1) |
| April, 2008 (2) |
| March, 2008 (4) |
| February, 2008 (4) |
| December, 2007 (2) |
| October, 2007 (2) |
| September, 2007 (1) |
| June, 2007 (1) |
| May, 2007 (4) |
| April, 2007 (4) |
| March, 2007 (2) |
| February, 2007 (4) |
| January, 2007 (3) |
| December, 2006 (1) |
| November, 2006 (4) |
| October, 2006 (7) |
| September, 2006 (2) |
| August, 2006 (14) |
| July, 2006 (9) |
|
There's a ton of free content on MSDN and elsewhere, but these professional courses usually cost about $50 each, and cover a specific task or topic in-depth. Enjoy!
One of my favorite development tools is Google. It's better than MSDN's built in search at putting the links I want at the top. For example, you can search for "site:microsoft.com Some Class, Method, etc." and quickly get MSDN docs on anything that's bugging you. And what developer hasn't Googled an error message? Now there's a new feature in Google labs that lets you search public source code. Obviously, you'll need to be wary of licensing issues, but if you want to see how a, say, an HttpHandler is used "in the wild", you'd just search lang:C# (or VB.NET, etc), and the keyword. One caveat: there's tons of bad code (tm) out there. Even on MSDN, there are hard-coded connection strings, unclosed readers, and un-disposed disposables galore. Don't use Google as a crutch for really learning your trade!
This is a pretty good article on some security considerations in ASP.NET applications, and how they can be addressed by editing your web.config file.
If you haven't checked out the September drop of the Atlas Control Toolkit (Soon to be renamed ASP.NET AJAX Control Toolkit), you should. One of the coolest new features is the AnimationExtender, which lets you declaratively animate controls. Just a few lines of markup buys you cross-browser scripted animation. Obviously, great potential for abuse and breaking site accessibility, but used sparingly could add some nice effects to your site. http://atlas.asp.net/atlastoolkit/
Need a lightweight paint program? Paint.NET is a full-featured, fast and free one written in C#. It hits that sweet spot that Jasc Paint Shop Pro used to: not so bulky that it's overkill for a quick web graphic, but not so feature-limited that you may as well use MS Paint. http://www.getpaint.net/
Here it is. So hopefully source code won't mess up our blog's layout anymore, let's see:
(Took out code block) Nope. Apparenly, it still causes problems in IE. We'll keep looking...
Ever wondered what a secure ASP.NET 2.0 application should look like? The ASP.NET Internet Security Reference Implementation rolls all of the Patterns and Practices Security Guidance into real-world sample application, complete with full documentation about all of the security features, why and how they were implemented, and the drawbacks to doing so. If you are doing ASP.NET 1.1 or 2.0 web design, you should download this, read through it, and check out the code. While the code is 2.0, all of the security concepts- and some of the solutions- map to 1.1 apps as well. One note: it installs into C:\Program Files\Microsoft\Internet Security Reference Implementation by default. It took me forever to find it!
Referencing fully-qualified object names in SQL Server can be tedious, particularly if you're not using an editor with Intellisense (a la ApexSQL Edit). If the object you're working with is on a linked server, it becomes even more of a burden to get the full name correct, since it can have 4 parts: server.database.owner.object
Fortunately, SQL Server 2005 comes to the rescue with a new database feature called synonyms. Synonyms can be used as an alias to a fully-qualified object name, so the table "ProductionServer.ProductionDatabase.dbo.Parts" can be referenced in your queries as simply "Parts" by issuing the following statement: CREATE SYNONYM Parts for ProductionServer.ProductionDatabase.dbo.Parts SELECT * FROM PartsThis can also be done visually in SQL Server Management Studio.
A quick tip for the Visual Studio 2003 and 2005 code editor: If you want to quickly change the case of some text, just select the text and hit Ctrl-Shift-U for upper or Ctrl-U for lower. Not exactly earth-shattering, but I was pleasantly suprised when I needed to upper-case a large chunk of text today and found this.
I recently data bound to a DateTime property in ASP.NET 2.0, and couldn't figure out why the formatting wasn't working properly. I set the DataFormatString property to {0:d}, which should change the column to short date format. But it wasn't formatting at all. After a little digging, I found that it was because HtmlEncode wasn't set to false. Setting HtmlEncode="false" on the column fixed the problem. Seems a bit odd at first, but the purpose of HtmlEncode is to prevent cross-site-script attacks. Here's what's happening: - The property's value is retrieved.
- ASP.NET converts the value to a string and formats it to remove any HTML. For example a '<' gets changed to '<'. So, if someone were to somehow add the value <script>doSomethingTricksy()</script> to your database, it wouldn't get run here...
- ASP.NET applies the DataFormatString, but by now the date is already a string.
- Formatting the string "1/1/2005 12:00:00 PM" doesn't do anything.
Since we know the type is a date, and it would be difficult to insert HTML into the date, then it's pretty safe to turn off this feature for this column. Microsoft has a little note on this issue here. I say pretty safe, because it's actually still possible that script or other HTML could be inserted into this column. A recent post by Scott Hanselman may give you a clue. Suppose you let users define their own DateTime formatting preferences, and did something really evil, like this: customCulture.DateTimeFormat.ShortDatePattern = Request("format").ToString() System.Threading.Thread.CurrentThread.CurrentCulture = customCulture System.Threading.Thread.CurrentThread.CurrentUICulture = customCulture And then suppose some crafty hacker sent a link to yourpage.aspx?format=<script>doSomethingTricksy()</script>MM/dd/yyyy. Any time you databound to a DateTime, if HtmlEncode was false, then the script would be run! Once somebody gets that far, they can do any number of bad things. Granted, it's a pretty low threat, but it's worth knowing about.
|