|
Subject:
|
Conversion to ASP.NET 2
|
|
Posted By:
|
sydneyausguy
|
Post Date:
|
1/4/2006 1:51:21 PM
|
I converted the core project and accounts modules to asp.net 2. The only problem i encountered was the XslTransform is now obsolete. I can't figure out how to change it to use the new class xslcompiledtransform
|
|
Reply By:
|
englere
|
Reply Date:
|
1/6/2006 8:15:06 AM
|
Maybe this is helpful to you:
http://forums.asp.net/993472/ShowPost.aspx
But I recommend getting rid of that nasty Nav box all together. That doesn't look like a typical web navigation control, it's on the wrong side of the page, and is generally ugly.
ASP.NET 2.0 has some great navigation controls. Look into the SiteMap and Menu controls.
Eric
|
|
Reply By:
|
Bill Lumberg
|
Reply Date:
|
1/6/2006 11:18:02 AM
|
When converting the project to asp.net 2 I can't figure out how to fix this casting issue. In the past I just had to ensure that the base.OnInit(e); came first in the OnInit method. However this is the case even with a fresh install of ThePhile being converted with VS2005 I get the following error everywhere this cast occurs.
An unexpected error has occurred on this page. The system administrators have been notified. Please feel free to contact us with the information surrounding this error. The error occurred in: http://localhost/ThePhile/Modules/NewsManager/Admin/Categories.aspx Error Message: Unable to cast object of type 'System.Security.Principal.GenericPrincipal' to type 'Wrox.WebModules.Accounts.Business.PhilePrincipal'. -------------------------------------------------------------------------------- Stack Trace: System.InvalidCastException: Unable to cast object of type 'System.Security.Principal.GenericPrincipal' to type 'Wrox.WebModules.Accounts.Business.PhilePrincipal'. at Wrox.WebModules.NewsManager.Web.Categories.Page_Load(Object sender, EventArgs e) in c:\wrox\ThePhile\Modules\NewsManager\Admin\Categories.aspx.cs:line 24 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Has anyone else come across this problem? Thanks in advance for any help.
Sean
|
|
Reply By:
|
englere
|
Reply Date:
|
1/6/2006 9:54:45 PM
|
This has nothing directly to do with 2005, but this is caused by mismatched DLL versions, or else bad references.
To upgrade to a from version 1.0 to 1.1 (this is not directly applicable to 2.0), the basic compilation model is the same, so you could rebuild the projects piecemeal. You could first delete ALL the .dll and .pdb files because they were built on your old version. This has the unfortunate side-effect of breaking all your references! As you know, you can't compile without having all your references in place for the project you are now compiling. Which leads to the question: which project can be compiled that has no dependencies on any other project in the solution? That's the one you need to compile first. Then you can fix the reference that any other projects have on that .dll, and you can compile them (assuming they don't need others that you haven't compiled yet). If you're careful you can do this process to build upon any .dlls you already built, and soon you'll have a whole working solution.
What about 2005? The problem is that the basic compilation model changed, and the manner in which projects are handled is now different. In fact, there are no projects - at least not in the way that you know them now. Projects are now just folders, and there is no .dll that belongs to one project. Each page compiles to a separate DLL now, and the way references are handled is different because of this. The new app_code folder is a common folder that holds common code, and this is compiled and referenced automatically.
This makes it hard to port a complex application made in earlier versions of ASP.NET. For this reason, a lot of companies complained to Microsoft, and Microsoft listened! They'll introduce a new (and optional) project model soon that is quite similar to the old model. This will make it easier to port old applications.
|
|
Reply By:
|
Bill Lumberg
|
Reply Date:
|
1/9/2006 9:34:45 AM
|
Well, Thank you for the response.
I guess I need to just wait untill the new project model is released from Microsoft for me to continue my migration to version 2.0? Do you have any idea on the proposed release date for that?
Thanks again,
Sean
|
|
Reply By:
|
englere
|
Reply Date:
|
1/10/2006 10:42:39 PM
|
Scott Guthrie announced they are working on it:
http://weblogs.asp.net/scottgu/archive/2005/12/07/432630.aspx
Watch his blog for further details:
http://weblogs.asp.net/scottgu/
|
|
Reply By:
|
Bill Lumberg
|
Reply Date:
|
1/20/2006 3:09:01 PM
|
Yay, I finally got everything working. Using Visual Studio 2005 Web Application Projects (Beta Preview). Everything works great under asp.net 2.0 without rewriting any code!
Here is all that you need to know:
http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/default.aspx
A step by step walkthrough is provided on Scott Guthrie's blog at:
http://webproject.scottgu.com/
I'm not using the XslTransform, however you might try looking at: http://msdn.microsoft.com/netframework/programming/breakingchanges/runtime/default.aspx For a list of the known runtime breaking changes.
|
|
Reply By:
|
englere
|
Reply Date:
|
1/20/2006 11:58:30 PM
|
Thanks Bill,
If anyone else is interested in this, the migration steps are here:
http://webproject.scottgu.com/CSharp/migration/migration.aspx
http://webproject.scottgu.com/VisualBasic/migration/migration.aspx
Eric
|
|
Reply By:
|
FT
|
Reply Date:
|
4/20/2006 5:26:29 PM
|
I have tryed to convert the ThephileII project to VS2005 and now I get this error.
The application for the project http://localhost/ThePhileII.csproj is not installed make sure the application for the project type (.csproj) is installed
How can I fiks this ???
|