Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
From VS 2005 to VS2012
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01576837
Message ID:
01576838
Views:
50
Was your old project a 'Web Site' or a 'Web Application' project?

Web Site projects don't compile the actual pages into a fixed assembly in the /Bin folder (ie. there's no MyWebSite.dll), while Web Applications do. The two project types have different ways of referencing CodeBehind files.

If you have a Web site and need to run it in a new Web Application I believe there is a "Convert to Web Application" option on the project which can take some but not all of the steps needed to convert. It's a pain. You can search online to find out what differences there are for the two project types. Mainly it involves small fixes to the page header (CodeBehind vs. CodeFile if I recall) and in some cases differences in how dynamic controls (user controls and masterpages) are accessed.

The other option is you can just run your application as a 'Web Site' under .NET 4.0/4.5. You still get all the new runtimes and features but you can maintain your original project type.

+++ Rick ---

>Hi,
>I am converting an ASP.NET web application from ASP.NET 2.0 to 4.0. Actually from VS2005 to VS2012. Here is what I did:
>In VS2012 I created a new empty web project. Then I manually copied all files (aspx, cs, etc) from the VS2005 folder to the new VS2012 project folder. Then in VS2012 I added existing items (all project file).
>When I execute (browse) a page I get the following error:
>
>
>Could not load type 'MyAspxPageName.MyUserControl'.
>
>%@ Control Language="c#" AutoEventWireup="True" Codebehind="MyUserControl.ascx.cs" 
>Inherits="MyAspxPageName.MyUserControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%
>
>Source File: /MyUserControl.ascx    Line: 1 
>
>
>Has anything changed in the way a user control is "wired" to the aspx page in VS2012? Or do you see or suggest anything I need to change?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform