Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 168823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:31:16+00:00 2026-05-11T12:31:16+00:00

I have an ASP.NET 3.5 Website (visual studio lingo), but the site continues to

  • 0

I have an ASP.NET 3.5 Website (visual studio lingo), but the site continues to grow and is looking rather cowboyish among other things. I’d like to see this get converted into a Web Application (namespaces and all).

Is this something that can be easily done in Visual Studio? If not, are there any other tools out there that could create all of the namespaces, etc. automagically?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:31:17+00:00Added an answer on May 11, 2026 at 12:31 pm

    Well, it turns out that the option ‘Convert to web application’ does NOT exist for ‘websites’. The option ‘Convert to web application’ does exist only for ‘web applications’ !!!!

    [emphasis mine]

    So, here’s the deal, to do the conversion, you need to:

    • Add a new ‘Web Application’ to your VS 2008 solution (File->Add->New Project->C#->Web->ASP.NET Web Application).

    • Afterwards, you copy all the files in the old ‘website’ to your newly created ‘web application’, and override any files created in it by default

    • The next step is the most ugly, you need to ‘manually’ add the references in your ‘website’ to the new ‘web application’. I thought the VS 2008 PowerCommands toy would do this for me as it does copy references from other project types, but it didn’t. You have to do it by yourself, manually, and you have to be cautious in this step if you have multiple versions of the same assembly (like AJAXToolkit in my case) or assemblies that have both GAC and local versions or so.

    • Keep repeating the last step and trying to build the ‘web application’. You’ll keep getting errors like ‘ ‘….’ is unknown namespace. Are you missing an assembly reference? ‘. Make sure you have none of those except the ones where ‘….’ is replaced by the IDs of the server controls you use. In other words, keep adding references and building the project until only the errors that exist because of missing .DESIGNER.CS or .DESIGNER.VB files.

    • Afterwards, go to the ‘web application’ root project node in VS 2008 solution explorer, and right click it, then you WILL find the option ‘Convert to web application’. What this option does is actually making small changes to the ‘@Page’ and ‘@Control’ directives of pages and controls, and creating the required .DESIGNER.CS or .DESIGNER.VB files.

    • Try building the ‘web application’ again. If you get errors, see what references may be missing and/or go click the ‘Convert to web application’ again. Sometimes, if there’s any error other than those caused of missing DESIGNER files, not all the pages/controls will have those DESIGNER files created for them. Fixing the non DESIGNER problem and clicking ‘Convert to web application’ again should do the job for this.

    • Once you are done successful VS build, you should be ready to go. Start testing your web application. Optionally, you can right click the ‘web application’ root project node in VS 2008 Solution Explorer and click ‘Properties’ then go to the tab ‘Web’ to set the ‘web application’ to a virtual folder in IIS (you can create new virtual directory from there in VS). If you want to use the IIS virtual directory that the old ‘website’ used, you need to remove that from IIS first.

    • Update: When testing your pages, pay MOST ATTENTION to classes in ‘App_Code’ folder, especially those with NO NAMESPACE. Those can be a big trap. We had a problem with two extension method overloads in the same static class that had no namespace,one extends DateTime? (Nullable) and calls another overload that extends DateTime itself. Calling the other overload as extension method passed VS 2008 compilation and gave us a compilation error ONLY IN RUNTIME (With IIS). Changing the call to the other overload from calling it as extension method to calling it as normal static method (only changing the call in the same class, calls from other classes remained extension method calls) did solve this one, but clearly, it’s not as safe as it used to be in VS 2005. Especially with classes with no namespaces.

    • Update2: During the conversion, VS 2008 renames your ‘App_Code’ to ‘Old_App_Code’. This new name sounds ugly, but DO NOT RENAME IT BACK. In the ‘web application’ model, all code will be in one assembly. In runtime, the web server does not know what web project type you are using. It does take all code in ‘App_Code’ folder and create a new assembly for it. This way, if you have code in folder named ‘App_Code’, you’ll end up with RUNTIME compilation errors that the same types exist in two assemblies, the one created by VS, and the one created by IIS / ASP.NET Development Server. To avoid that. leave the ‘Old_App_Code’ with the same name, or rename it to ANYTHING EXCEPT: ‘App_Code’. Do not place any code in such ‘App_Code’ folder and prefereably do NOT have a folder with such name in your ‘web application’ at all.

    I know this since before but forgot it now as I have not used ‘website’ model for long :(.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.net website running on my computer through Visual Studio 2010. localhost:14587/site/login.aspx
I have a asp.net website with c# code behind and using visual studio 2010.
I have a website project (C#/ASP.NET) opened in Visual Studio 11 (beta) which works
I have a ASP.net MVC2 website that was working great when using Visual Studio
Using Visual Studio 2008, I have published my ASP.NET website to my local disk
I have a company website (Visual Studio / VB / ASP.NET 4.0) and it's
I have a company website (Visual Studio / VB / ASP.NET 4.0). I localized
I have my company's website (Visual Studio / vb / asp.net 4.0) localized in
I have installed ASP.NET along with my Visual Studio, but when I tried to
I have developed an ASP.NET Website in Visual Studio 2008. Now I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.