Microsoft Most Valuable Professional

Chris Pietschmann

An MVP From Wisconsin

ASP.NET 2.0: Rewriting URL Paths just got a whole lot easier

Rewriting URL paths in ASP.NET 2.0 is referred to as URL Mapping. Instead of putting some code in your Application_BeginRequest method, you can now just put a few lines in your Web.Config file and like magic you can rewrite those URL paths with ease.

With URL Mapping you can turn a not so freindly URL like ~/Blog/Post/11/12/2005/145.aspx into ~/TheCoolestPost.aspx

Example Web.Config File:

[code:html]
<?xml version="1.0" ?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <system.web>


    <urlMappings enabled="true">
      <add
          url="~/Category.aspx"
          mappedUrl="~/Default.aspx?category=default" />
      <add
          url="~/Autos.aspx"
          mappedUrl="~/Default.aspx?category=autos" />
      <add
          url="~/Games.aspx"
          mappedUrl="~/Default.aspx?category=games" />
      <add
          url="~/Health.aspx"
          mappedUrl="~/Default.aspx?category=health" />
      <add
          url="~/News.aspx"
          mappedUrl="~/Default.aspx?category=news" />
    </urlMappings>


  </system.web>
</configuration>
[/code]

Since the Web.Config file is an XML document, you could add functionality to the admin section of your app to add/edit/delete custom URL Mappings. This is definately something I'm going to keep in mind for future ASP.NET 2.0 app I design/build.

kudos to the ASP.NET team. This is just one of the many new features added to ASP.NET 2.0. And they couldn't have made it any easier to use!

URL Mapping in ASP.NET 2.0: http://beta.asp.net/QUICKSTART/aspnet/doc/navigation/urlmapping.aspx

If you want to see how to rewrite url paths with ASP.NET 1.x go here: http://edsid.com/blog/articles/160.aspx

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General
Posted by crpietschmann on Wednesday, June 29, 2005 2:43 PM
Permalink | Comments (4) | Post RSSRSS comment feed


Boolean Expression in .NET: strName IN ("CHRIS","TOM","TYLER")


I think it would be really helpful if we could do boolean expressions with IN sort of like we can in SQL.

For Example:
   'just like SQL
   If strName IN ("CHRIS","TOM","TYLER") Then
      'do something
   End If

   'using an array for this would be best
   Dim arrNames() AS String = New Array{"CHRIS", "TOM", "TYLER"}
   If strName IN arrNames Then
      'do something
   End If

   'or like this
   If strName IN New Array{"CHRIS", "TOM", "TYLER"} Then
      'do something
   End If

p.s. You'll have to excuse any bad code grammar, I typed this straight from my head

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by crpietschmann on Friday, June 24, 2005 12:00 PM
Permalink | Comments (2) | Post RSSRSS comment feed


Is Visual Studio 2005 divine?

I started the installation of Visual Studio 2005 on my laptop, and then walked away to come back later and click Finish. When I came back I saw that the suns rays were shining down on my laptop. Is Visual Studio 2005 and .NET Framework 2.0 the divine development platform?

This made me laugh; it's totally like in the movies when they have sun rays shine down on something they want to show as being “divine”.

Maybe this is a sign?  ;)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: General
Posted by crpietschmann on Saturday, June 18, 2005 9:36 PM
Permalink | Comments (1) | Post RSSRSS comment feed


I have alot of .NET books...

It's been two years since I started learning .NET and recieved my MCAD, and I now have a total of 18 books on .NET related development topics. I never counted them until today; I just kept buying/winning one every 4 to 6 weeks. Most of them are from Microsoft Press.

Here's the last 4 I've gotten (in the last couple weeks by the way):

  1. .NET Remoting (ISBN: 0-7356-1778-3) - I won this one at the last WI-INETA meeting
  2. Introducing Visual Basic 2005 For Developers (ISBN: 0-7356-2058-X)
  3. Introducing ASP.NET 2.0 (ISBN: 0-7356-2024-5)
  4. Introducing SQL Server 2005 For Developers (ISBN: 0-7356-1962-X)

Am I crazy in thinking this is a high number of .NET books? Does anyone have more?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General
Posted by crpietschmann on Saturday, June 18, 2005 6:29 PM
Permalink | Comments (1) | Post RSSRSS comment feed

Perfect Dark Zero to be released on XBox 360!

Perfect Dark Zero - 001Score!! I've been waiting for this game for years (I don't even remember how long). I'll have to buy an XBox 360 so I can play it.

Check it out: http://www.PerfectDarkZero.com

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,
Categories: General
Posted by crpietschmann on Saturday, June 18, 2005 5:37 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Is it really Microsoft's fault?

Most of the problems I've experienced with Win9x and Win2K/XP with "blue screens" have been caused by problems with device drivers. These were all device drivers that Microsoft didn't write. Yes, they were third party device drivers, but should I blame Microsoft? I think my analogy of nails on the road (stated above) somes this up perfectly.

People are always quick to talk smack about the one on top, but they almost never do their homework to find the facts to back themselves up. This is the reason I don't read SlashDot very often, almost none of the posts on SlashDot that I've read were posted by people that knew enough about computers/software an how they work to have any validity to what they say. I think SlashDot is just a bunch of 12 or 13 year olds talking about things that they don't know much about, but they feel cool just cause they are talking about them.

I just feel like slapping those people "pimp style" (you know baby powder and all) and yelling "Stop being so ingnorant!" (and possibly some vulgarities that come to mind in the heat of the moment).

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: General
Posted by crpietschmann on Saturday, June 18, 2005 12:37 PM
Permalink | Comments (0) | Post RSSRSS comment feed

The NEW Microsoft Certified Architect Program (MCAP)

Microsoft has announced the new Microsoft Certified Architect Program (MCAP). The goal of the MCAP is to identify the top industry experts in IT Architecture. This is a very high level certification.

The certification process has 8 steps:

  1. The Microsoft Certified Architect candidate is expected to have at least 10 years of verifiable experience as a practicing architect prior to applying for the program
  2. The candidate applies for acceptance into the program by:
    • Contacting Microsoft directly (via the Microsoft.com web site) during an open enrollment period
    • Being referred by his or her employer
    • Being referred by an existing Microsoft Certified Architect or Microsoft Certified Architect Review Board member
  3. The candidate’s application is screened for the necessary work experience
  4. Upon verification of experience, the candidate is accepted into the program and assigned a program mentor
  5. In addition to a program mentor, the candidate is given access to a library of self-paced technical and non-technical content to assist them in the preparation of their solution
  6. The candidate submits his or her solution to the Review Board in preparation for formal presentation to the Board.
  7. The candidate attends the Review Board Meeting and presents his or her solution to the Review Board members. Upon conclusion of the presentation, the candidate fields a series of questions about his solution and presentation from the Review Board
  8. After the formal presentation and a positive vote from the Review Board, the candidate is awarded the Microsoft Certified Architect credential

I think this is a great move. This cert will single out the best of the best in IT Solution Architecture. However, I don't really agree with the initial requirement of 10 years of verifiable experience as a practicing architect prior to applying. I think they should maybe recomend 10 years but require maybe say 5 year of experience. Someone with 10 years of experience could be at the same level as someone with 5 years of experience. Everybody learns at different rates (I'm not complaining about the requirements because I want to apply for it now.) I wouldn't want to see someone have to wait 5 more years to be able to be accepted into the program just because (even though they are qualified) they only have 5 years of expereince.

Who knows, maybe some day I'll become MCAP certified.

For More Info: http://www.microsoft.com/learning/mcp/architect/

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General
Posted by crpietschmann on Monday, June 13, 2005 12:02 AM
Permalink | Comments (0) | Post RSSRSS comment feed

msdn2.microsoft.com - Lots of improvements for MSDN Online!

For those who don't know, http://msdn2.microsoft.com has all the Visual Studio “Whidbey” 2005 documentation. It's not fully complete because they are still building up the library, but it is still quite extensive.

I found this blog post by Tim Ewald (http://pluralsight.com/blogs/tewald/archive/2004/09/23/2368.aspx), outlining some of the major improvements they are making with the new version of the MSDN web site. They are basically making it so we wont have so many darn broken links when we link to MSDN articles on our blogs or other sites. (I'm sure your familiar with the oddity that is broken links to the MSDN)

Apparently MSDN2 has been up on the web since September 2004; but I just found out about it from Jacob Cynamon at the Visual Studio 2005 Developers Conference in Chicago this May.

I can't wait for Whidbey to ship, but at least I have Beta 2 to play with. I'm just lovin' this stuff!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: General
Posted by crpietschmann on Sunday, June 12, 2005 11:44 PM
Permalink | Comments (0) | Post RSSRSS comment feed

SlapDev.com abandoned for now

I had some dissapointments with the hosting service I was using for SlapDev.com and with the Community Server app that I was using for it. I'm not sure if my problems were all to do with the hosting service, all to do with Community Server, or somewhere in between.

All my sites are back on http://discountasp.net 's servers. I am very happy with there hosting service, especially after moving away and then having to move back. I definately recommend them to others.

Now for Community Server; I guess I'll have to do more testing befor I launch a site with it again.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General
Posted by crpietschmann on Sunday, June 12, 2005 1:21 PM
Permalink | Comments (0) | Post RSSRSS comment feed

About the author

I'm Chris Pietschmann, go to the About Me page to learn more about me.

Search

Sponsors

Web.Maps.VE - ASP.NET AJAX Virtual Earth Mapping Server Control

Recent comments

Disclaimer


This work is licensed under a Creative Commons Attribution 3.0 United States License, unless explicitly stated otherwise within the posted content.
© Copyright 2004 - 2008 Chris Pietschmann