Upgrading issues

Discussion about the open-source Phalanger [?] project.

Upgrading issues

Postby rsweeney5 » February 14th, 2012, 5:40 pm

I have been working on a .net site using Phalanger 2.0 on and off for some time, up to the point when I changed to 3.0 everything worked fine. After the first installation (of 3.0) I ran into the error the Sample ASP.net site has so I went back to the Dec release and some of the pages are fine, but many of them are giving me errors like "Unable to cast object of type ??? to type ??? ,the errors seem to be endless.

Heres one example:
Code: Select all
Unable to cast object of type 'System.Web.UI.WebControls.Button' to type 'System.Web.UI.WebControls.LinkButton'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Unable to cast object of type 'System.Web.UI.WebControls.Button' to type 'System.Web.UI.WebControls.LinkButton'.

Source Error:


Line 59: <br/>
Line 60: d. Crossroads of <asp:TextBox runat="server" id="Crossroads1"></asp:TextBox> and <asp:TextBox runat="server" id="Crossroads2"></asp:TextBox><br/>
Line 61: <asp:Button runat="server" Text="Use Crossroads to find me" id="Buttoncrossroads" onclick="crossgeo" CausesValidation="False" ></asp:Button>
Line 62: <asp:Button runat="server" Text="Just use my zipcode" id="Buttoncitystate" onclick="zipgeo" CausesValidation="False" ></asp:Button><br/>
Line 63: <asp:Label runat="server" id="Labelfailgeo" ForeColor="Red" ></asp:Label>
 

Source File: C:\inetpub\lawnquotes\user\my_property.aspx    Line: 61

Stack Trace:


[InvalidCastException: Unable to cast object of type 'System.Web.UI.WebControls.Button' to type 'System.Web.UI.WebControls.LinkButton'.]
   CallSite.Target(Closure , CallSite , Object ) +126
   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +4196568
   ASP.user_my_property_aspx.__BuildControlButtoncrossroads(ScriptContext ) in C:\inetpub\lawnquotes\user\my_property.aspx:61
   ASP.user_my_property_aspx.<Mediator>(ScriptContext ) +37
   ASP.user_my_property_aspx.__BuildControlButtoncrossroads(Object instance, PhpStack stack) +114
   CallSite.Target(Closure , CallSite , Object , ScriptContext ) +438
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +699
   ASP.user_my_property_aspx.__BuildControlPanelgeo(ScriptContext ) in C:\inetpub\lawnquotes\user\my_property.aspx:56
   ASP.user_my_property_aspx.<Mediator>(ScriptContext ) +37
   ASP.user_my_property_aspx.__BuildControlPanelgeo(Object instance, PhpStack stack) +114
   CallSite.Target(Closure , CallSite , Object , ScriptContext ) +438
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +699
   ASP.user_my_property_aspx.__BuildControlPanelinformation(ScriptContext ) in C:\inetpub\lawnquotes\user\my_property.aspx:18
   ASP.user_my_property_aspx.<Mediator>(ScriptContext ) +37
   ASP.user_my_property_aspx.__BuildControlPanelinformation(Object instance, PhpStack stack) +114
   CallSite.Target(Closure , CallSite , Object , ScriptContext ) +438
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +699
   ASP.user_my_property_aspx.__BuildControlContent1(ScriptContext , Object __ctrl) in C:\inetpub\lawnquotes\user\my_property.aspx:4
   ASP.user_my_property_aspx.<Mediator>(ScriptContext , Object ) +40
   ASP.user_my_property_aspx.__BuildControlContent1(Object instance, PhpStack stack) +133
   <^DelegateStub>(DObject , Control ) +138
   System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) +12
   System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) +87
   <^>.InstantiateInContentPlaceHolder(Object , PhpStack ) +271
   CallSite.Target(Closure , CallSite , Object , ScriptContext , Object , Object ) +465
   System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) +444
   ASP.main_master.__BuildControlContentPlaceHoldermain(ScriptContext ) in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\45eea51e\4d70f9ed\App_Web_p1kti1cc.0.php:620
   ASP.main_master.<Mediator>(ScriptContext ) +37
   ASP.main_master.__BuildControlContentPlaceHoldermain(Object instance, PhpStack stack) +114
   CallSite.Target(Closure , CallSite , Object , ScriptContext ) +438
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +699
   ASP.main_master.__BuildControlform1(ScriptContext ) in C:\inetpub\lawnquotes\main.master:23
   ASP.main_master.<Mediator>(ScriptContext ) +37
   ASP.main_master.__BuildControlform1(Object instance, PhpStack stack) +114
   CallSite.Target(Closure , CallSite , Object , ScriptContext ) +438
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +699
   ASP.main_master.__BuildControlTree(ScriptContext , Object __ctrl) in C:\inetpub\lawnquotes\main.master:1
   ASP.main_master.<Mediator>(ScriptContext , Object ) +40
   ASP.main_master.__BuildControlTree(Object instance, PhpStack stack) +133
   CallSite.Target(Closure , CallSite , Object , ScriptContext , Object ) +471
   System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3(CallSite site, T0 arg0, T1 arg1, T2 arg2) +474
   ASP.main_master.FrameworkInitialize(ScriptContext ) in C:\inetpub\lawnquotes\master_aspx.php:912307
   ASP.main_master.FrameworkInitialize() +64
   System.Web.UI.UserControl.InitializeAsUserControlInternal() +35
   System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +8964498
   System.Web.UI.Page.get_Master() +54
   System.Web.UI.Page.ApplyMasterPage() +15
   System.Web.UI.Page.PerformPreInit() +45
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +328

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


Any thoughts on where the problem may lie? Should I just go back to 2.0 where I know it works, or might it be a configuration problem? Any insight or thoughts would be great.
rsweeney5
 
Posts: 2
Joined: February 14th, 2012, 2:15 pm

Re: Upgrading issues

Postby Jakub Misek » February 15th, 2012, 4:41 pm

Hi,

did you try to clean ASP.NET Temporary files?
Code: Select all
%WinDir%\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
%WinDir%\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files


I can't see any usage of LinkButton in the code. So it seams to me there is some old compiled code not being refreshed?
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Upgrading issues

Postby rsweeney5 » February 16th, 2012, 12:06 am

I will be sure to try that at my next upgrade attempt for now I just reverted back to the old version, but I appreciate your thoughts and will give it a shot if it comes up again.

There was no reference to linkbutton in the code nor the function that was called from the button, eventually I did find that I could use only onClick events from asp:Linkbutton and onCommand events from asp:Button which I found odd.
rsweeney5
 
Posts: 2
Joined: February 14th, 2012, 2:15 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 5 guests

User Control Panel

Login

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 787 on May 12th, 2024, 11:50 am

Users browsing this forum: No registered users and 5 guests