VS 2003->VS 2005 Web Application Project Upgrade Tutorials Now Live

I blogged on Friday about the first preview build of the VS 2005 Web Application Project support being released.

This weekend I wrote and published both the C# and VB migration tutorials that walkthrough step-by-step how to use this new web project model to upgrade VS 2003 web projects.  They are now live on http://webproject.scottgu.com.

With the final release of the VS 2005 Web Application Project download, there will be a upgrade wizard that automates Steps 1->8 in the above migration tutorials when you open a VS 2003 web project.  Until then, you can follow the manual steps outlined in the tutorials above to upgrade existing VS 2003 web apps using the preview download.  In general, I've found that it takes about 15-20 minutes to complete the manual steps for the first application you migrate (and about 5 minutes per application once you know what you are doing - since the steps are pretty easy to zip through).

So far, the feedback from people following them has been very positive (all of the starter kits and apps I've personally tried have also upgraded clean without problems):

Please let me know if you run into any issues with the tutorials or upgrading apps with them (feel free to also let me know if you upgrade without problems -- that would be nice to know too <g>).  I can both help you with any issues you find, but more importantly update the tutorials so that others don't run into the same issue again.

Hope this helps,




  • Hello Scott

    when I first received my VS2005 I couldn't believe that the only big problem I was facing was the new web file structure.

    But when I installed the Beta Preview you made available on saturday I actually could upgrade everything easely!

    Thank you very much.

    Tiago D'Herbe

  • This culture of community involevement that ASP.NET team champions should be spread to the rest of Microsoft. You are the perfect example of a leader that leads by example.

    Don't mean to kiss ass but you guys really have changed the image I had about microsoft. The ASP.NET team rocks!!!!

  • I followed the VB migration tutorial and it worked great. My solution is rather complex and I didn't expect it to work. Web Site Projects didn't work because I dynamically load usercontrols from within an ITemplate and the Web Site Project didn't like that at all since it couldn't reference the usercontrol class.

    I did run into one minor problem with references though. I have several dlls in \bin and VS said they were unreferenced when in fact they were. Ever time I did a rebuild it would delete the dlls so the solution would not compile. I moved the dlls to a different folder, deleted and re-added the references, and now it works fine.


  • The tutorial is very nice!

    But, I ses the &quot;Add new item&quot; dialog here is also like the one in vsnet, what is determining the order in which the items are shown in these dialogs?

    I'm always hunting for the right item, why not alfabetic sort?

  • Hi AsbjornM,

    The exact ordering is based on the item templates installed (you can in theory go in and tweak these if you want -- although i'd recommend against doing so). We tried to order the templates based on how commonly different items were used. That is why pages and classes are near the top, whereas .browser file templates are near the bottom (we thought this would be better than alphabetical -- otherwise you'd always have to navigate pass the browser files to get to pages or classes).

    Hope this helps,


  • Ah, ok, it makes more sense when I'm viewing it with large icons, I have used small icons, so now I see.

  • And another thing, the Web Deployment Project, which is working very nice, has one bug.

    If you deploy an site as not updateable everything is ok, the contents is fine, but if I create an updateable site, then all aspx/asxc files is missing all norwegian characters..

    (I tested Rick Strahls deploy app to, and that is doing the same thing, so i think it is the aspnet_merge that is causing the problem?)

  • I won't be able to use this until controls added to design view are automatically made available in the code behind file. For me, that is the biggest piece missing.

  • Hi flipdoubt,

    Yep -- totally understand on the need to have the control field's automatically generated (verus today how they need to be manually added). That is the big feature we are working on now. Our January refresh will have this feature implemented.

    Hope this helps,


  • Hi Sonu,

    Yep -- an RSS feed is definitely a cool idea. I've been planning to build some simple RSS publishing controls in the near future. I'll use this to setup an RSS feed sometime over the holidays.



  • Great, looking forward to add them to www.dotnetslackers.com :)

  • Hi AsbjornM,

    Yes -- that is unfortunately a known bug with the current Web Deployment Project download (note to others: that is not this release, but rather another download).

    The release refresh that comes out in early January will have that fixed.

    Hope this helps,


  • This feature looks like very nice. I use this feature very often in VS230 but I have a question.

    In VS2003 with some hack i could add ASXP and ASCX files to a Class Library, and, in my application I had an module that dinamically loads the acxs that is refered to dll in /bin directory.

    What hack I should do to my VS2005 for the class library accept ASCX files?

  • Scott,

    I just walked through the conversion to a web application procedure you outlined in your tutorial - it worked great! My application is started as an IbuySpy app and has evolved over the years - it came right over and runs fine in VS2005 using IIS on a 2003 server.

    Excellent tutorial - thanks! Now I can start using VS2005 for real!

    Ken Miller

  • Hi,

    Not sure where/how you want feedback, but since this seems to be the latest blog entry about this, I figured this was as good a place as any.

    Just started using this yesterday, and wanted to mention one yay and one nay in the details of how this is working.

    The yay is that a new aspx page created within a directory seems to now be named and namespaced correctly. For instance, when I add a new page under a folder called Foo, it generates Inherits=&quot;MySite.Foo.PageName&quot;, and the .cs file automatically includes a namespace MySite.Foo line. The Web Site project did this incorrectly, generating Inherits=&quot;Foo_Pagename&quot; with no namespaces in the cs file. Yay for correcting this!

    The nay is that the generated aspx page generates CodeBehind=&quot;Page.aspx.cs&quot; which is then flagged as a warning as &quot;no longer supported.&quot; Should I manually change this to CodeFile, or will this break the designer.cs concept? Or will a future release remove this warning?

  • Hi Jim,

    I'm glad things seem to be working well. The &quot;codebehind is no longer supported&quot; warning message is a known issue with this first release of the preview. We will be fixing this in a future refresh download. For right now you can just ignore it and it will not interfere with compilation.

    Hope this helps,


  • Hello ..

    Scott, your solution is the one I'm using, but when I run my WebSite, I get more then one WebServer running and should be just one.

    How can I avoid this situation?

    tkx in advance

    Paulo Aboim Pinto

    Odivelas - Portugal

  • Any way to compile the entire site (including aspx, ascx, and asmx files) into a single DLL? This would be the absolute best for us.

    Of course, we would also need to be able to specify (at least) ascx files that shouldn't be compiled into the DLL - (e.g. ascx files in our 'Theme' directory), which we want our customers to be able to modify.

    Great work, and thanks! We are definately going to be using this for our web projects when we upgrade.

  • Hi Scott,

    Thanks for the response.

    I've run in to another stumbling block when I tried to deploy a test application using a User Control. I get the following error:


    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: The file '/UserControls/TmpHeader.ascx.cs' does not exist.

    Source Error:

    Line 1: &lt;%@ Control Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;TmpHeader.ascx.cs&quot; Inherits=&quot;Sbt2.UserControls.TmpHeader&quot; %&gt;

    Line 2: &lt;TABLE id=&quot;Table1&quot; width=&quot;100%&quot;&gt;

    Line 3: &lt;TR&gt;

    Source File: /UserControls/TmpHeader.ascx Line: 1

    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42


    My deployment was working with the previous &quot;web site project&quot; before I switched over, so I think things are set up properly.

    I even tried your tutorial on making a reusable library of controls, rather than placing the controls directly in the web app, since this gave me the ability to rename the resulting DLL (in case the namespace was causing the problem). Same result.

    This works just fine locally in Cassini. Any idea why it's trying to find the CS file? Thanks.

  • Hi Paulo,

    Apologies for the delay in getting back to you -- I've been on vacation the last 2 weeks and fell behind on email.

    If you pull up the Web Application Project properties and click on the &quot;web&quot; tab, you can control where the project runs -- either through Cassini (the built-in web-server) or via IIS. If you are using IIS, then I'd recommend just pointing it at the IIS vroot. Then there would only be one web-server.

    Did I answer your question?



  • Hi Curtis,

    Apologies for the delay in getting back to you -- I've been on vacation the last 2 weeks and fell behind on email.

    When you use a Web Application Project in conjunction with a Web Deployment Project, you will have the ability to pre-compile pages and user-controls into a single assembly that you re-distribute (we call this feature pre-compilation).

    Hope this helps,


  • Hi Jim,

    Apologies for the delay in getting back to you -- I've been on vacation the last 2 weeks and fell behind on email.

    The problem with your source code above is that you still have a &quot;codefile=&quot; attribute in your .ascx file instead of the &quot;codebehind=&quot; attribute. As such, ASP.NET is still trying to dynamically compile it using the web-site semantics. With Web Application Projects you instead want to compile it as part of the project. If you rename codefile to codebehind you will signal this intent -- and not have to copy any source when deploying.

    Hope this helps,


  • Scott

    Do you have some date to release the VS 2005 Web Application Project?

  • Hi Fabio,

    We will have a better idea of the final ETA in a few weeks -- although we are planning on releasing a refresh build of it later this month.

    Hope this helps,


  • Scott:

    I have an ASP.NET v1.1 web app that was running perfectly for a long time.

    I recently used the new &quot;Web Application Project&quot; type to convert my v1.1 application to v2.0

    Everything went smoothly with the migration, I made NO changes to the code and was able to deploy the project.

    I installed on a few production clients for BETA testing.

    The problem I am finding with 1 client in particular is a steady increase in memory usage for the w3wp.exe process.

    It grows over the course of a day [reaches over 300MB] and eventually the application crashes with errors such as:

    System.OutOfMemoryException: Creating an instance of the COM component with CLSID ...

    I searched the web and found that usually the answer is &quot;you must have an infinite loop or some other memory leak&quot;,

    but again, I did not change any code between v1.1 and v2.0.

    [this message posted on newsgroup also]


  • Scott,

    When the next release comes, will you have a wizard to switch between project mode and web site mode in VS2005? We already converted to the 2005 web site model, but really need the project model to properly maintian our apps.

    I'd convert to the project model now, but it would be a real pain because it won't automatically generate the rest of the partial class yet. Really looking forward to that next drop. Hope it's soon.

  • Scott,

    A couple of weeks ago, I followed your turorials. Everything worked fine and I converted some of my projects. I was working on my laptop - it only had vs2005 on it. Today I installed VS2005 on my development machine. VS2003 still works fine, but the beta web aplications project code hits this error and rolls back: Unable to get installer types in c:\program files\Microsoft Visual Studio 8\Common7\ide\microsoftvisualstudio.web.aplication.dll assembly. --&gt; Unable to load the requested types. I think the vs2003 environment might be keeping it from installing in vs2005 -- The message also says to retrieve the loaderexceptions propery for more informations -- I have no idea where to find it. Any help would be appreciated. I have put my converted projects on a webserver - and would like to get back to my desktop machine. -- VS2005 works fine on the development machine in the default web site mode - I just can't get the new web applications project beta to load.

  • Hi Ken,

    Can you send me an email at scottgu@microsoft.com with more details about teh setup error you are having. I can then add more people to the thread and we can investigate.


    - Scott

  • Hi Mike,

    A conversion tool to move from the web-site project to the web-application project model is one of the things we are looking at. We might not have it automated with the next refresh (it might be the version after that), but at the very least we will be looking to create a tutorial that walks you through how to do it.

    Hope this helps,


  • I am upgrading a VS 2003 ASP.NET project to VS 2005.

    I have converted it to a Web Site Project and also to an Web Application Project.

    I have used the old System.Web.Mail namespace in the project and ConfigurationSettings.AppSettings[] at several places.

    I get several compilers warnings (coz these are old API's) on the Web Application project but none whatsoever on the Web Site project.

    Don't know why ?? Any ideas.

  • Hi Tushar,

    You can configure different projects to have different settings for handling deprecated APIs. I believe the default settings in web application projects are to mark these as warnings, whereas web-site projects don't.

    Hope this helps,


  • Hi Scott,

    After running VS2005 on machines with no VS2003 I had to get back to one with both. WAP installation has failed with the same diagnostics related to Microsoft.VisualStudio.Web.Application.dll assembly. Googling brought back your request to send an additional info back January. I'm wondering if this issue ever been resolved? Could you please advise on what to do about it.


  • Hi Michael,

    If you can send me email directly (scottgu@microsoft.com) I can connect you up with someone who can help get this fixed for you.



  • Hi Shashank,

    Can you check your application within IIS and see where the application root has been set? I'm wondering whether you are running into a problem where your parent directory is marked as the application, and not the root directory of your project.

    This might cause ASP.NET to load things from the wrong \bin directory.



  • While Migrating the user controls
    with the shared property

    it gives an error

    "Reference to the object not found".

  • Hi Vishal,

    Can you send me an email with more details on the error you are seeing? My contact details can be found in the "about" link of this site.



  • Hi Scott,
    Sorry to put you through the trouble. The code was fine. It was a problem with my host. They had written to me saying that they have shifted my domain to .NET 2.0 framework when actually they hadn&#39;t and I was still trying to run the site on 1.1. And their control panel is sick. Well, that&#39;s the last time I&#39;ve worked with them ;).
    After the shiftover, it&#39;s running fine.

Comments have been disabled for this content.