Repeat after me, "check yourself before giving bad advice"

by Ben Hart 3. November 2008 12:59

Some time ago I started to give some advice to someone on the alt.net mailing list regarding converting an ASP.NET 1.1 web site to ASP.NET 2.0. I'd gone through this some time before that, and thought I could share some pointers. Another reader had suggested he skip 2.0, and bring it into 3.5, which made sense.

I don't really use the Web Site template (or is it a model?). Having come from the early days, Web Application was a lot more familiar, and I (thankfully) bridged into 2.0 after the initial release of the separate installer. I've since played around a little with the Web Site, but the Web Application will remain the only one I'd choose. Not sure if that's resistance to change (since I've never really taken the time to understand the real differences) or just my natural knack to pick the best model.

To cut a long story short, I couldn't understand the problems he was having converting the now Web Site (he'd rolled into VS 2008) into a Web Application. Dude, just right-click the site, and select "Convert to Web Application". No, really, dude, while it was a while ago, I've been through this. Just right-click the site, and select "Convert to Web Application". This carried on for a few more mails, before I presumed he'd finally seen the context menu item. It turns out his silence was more likely his giving up in frustration (or disgust).

I'm currently playing around with the Flixon site generator (which has a home elsewhere, the forum announcement seems to pip it in Google page rank, though), which generates a ASP.NET Web Site. Being more comfortable with Web Applications (and not wanting to learn how to reference Web Site code from a separate assembly for testing), I thought I'd just convert it to a Web Application. So just right-click, and select "Convert to Web Application". Hmm. Ok. Just right-click and select "Convert to Web Application". Hmmmmmmmm, that's weird. That option doesn't exist.

Turns out you can only convert a Web Application to a Web Application (as ridiculous as that might sound). The first step is to copy and paste all files from the Web Site to a freshly created Web Application. The rest of the steps are best described by Mohamed Meligy in this post. I think (but I'm not certain) that the same applies to 2.0, but who knows.

Sorry about the bad advice, guy. Next time I promise I'll check before harping on.

Technorati Tags: ,

Be the first to rate this post

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

Tags: ,

.NET | ASP.NET

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About me...

I'm a passionate .NET developer, with C# my language of choice. I've been at it for a number of years now, and enjoy that I'll never shake the feeling I'm just starting out.

I love software, and I love building it even more. I love knowing that my work facilitates others', and that one line of code at a time, we're increasing our capability.

More...



Page List