From: Andy M. <am...@st...> - 2007-08-08 17:05:13
|
If you have .NET 3.5 installed (i.e. any beta version of VS2008), you = will need a fix to Anthem.Manager that I posted in CVS. http://anthem-dot-net.cvs.sourceforge.net/anthem-dot-net/anthem/Anthem/Ma= nag er.cs?r1=3D1.72&r2=3D1.73 -----Original Message----- From: ant...@li... [mailto:ant...@li...] On Behalf Of Kieran Benton Sent: Wednesday, August 08, 2007 3:26 AM To: ant...@li... Subject: [Anthem.NET-users] Difficulty in getting started (1.5.1) Hi all, I'm trying to get my local machine working with just a simple Anthem project, but running into problems with the latest release 1.5.1. Essentially I've built the 2005 project perfectly fine (in release mode) = and then referenced the built Anthem.dll from my test project. This consists = of just two files (at bottom of mail). I've tried with and without Anthem.Manager.Register(this); in my = Page_Load handler to no avail, everytime I click the linkbutton and trigger the callback I get an exception: ApplicationException: This page was never registered with Anthem.Manager! Anthem.DLL!Anthem.Manager.GetManager() Line 251 =09 Anthem.DLL!Anthem.Manager.WriteValueAndError(System.Text.StringBuilder = sb =3D {{"value":null,"error":"This page was never registered with Anthem.Manager!"}, object val =3D null, string error =3D "This page was = never registered with Anthem.Manager!", string viewState =3D null, string viewStateEncrypted =3D null, string eventValidation =3D null, System.Collections.Hashtable controls =3D null, string[] scripts =3D = null) Line 1125 + 0x5 bytes Anthem.DLL!Anthem.Manager.WriteResult(System.IO.Stream stream =3D {System.Web.HttpResponseStreamFilterSink}, System.IO.MemoryStream = htmlBuffer =3D {System.IO.MemoryStream}) Line 2168 + 0x28 bytes Anthem.DLL!Anthem.CallBackFilter.Close() Line 2232 + 0x15 bytes Digging into this shows that something screwy seems to be happening = here: private static string GetAnthemManagerKey() { Page page =3D HttpContext.Current.Handler as Page; if (page =3D=3D null) { return "Anthem.Manager.Handler"; } else { return "Anthem.Manager." + page.ToString(); } } With "page" evaluating to null and so returning the incorrect key? Anyone had a similar problem? I'm tearing my hair out because the = framework looks fantastic - a really lightweight alternative to Atlas! Default.aspx ------------ <%@ page Language=3D"C#" AutoEventWireup=3D"true" %> <%@ register assembly=3D"Anthem" namespace=3D"Anthem" = tagprefix=3D"anthem" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat=3D"server"> protected void Page_Load(object sender, EventArgs e) { Anthem.Manager.Register(this); } [Anthem.Method] public void linkDo_Click(object sender, EventArgs e) { this.panelExciting.Visible =3D !this.panelExciting.Visible; this.panelExciting.UpdateAfterCallBack =3D true; } </script> <html xmlns=3D"http://www.w3.org/1999/xhtml"> <head runat=3D"server"> <title>Test</title> </head> <body> <form id=3D"form1" runat=3D"server"> <div> <anthem:linkbutton id=3D"linkDo" runat=3D"server" = text=3D"Do Something" TextDuringCallBack=3D"Working..." onclick=3D"linkDo_Click" /> <anthem:panel id=3D"panelExciting" runat=3D"server" visible=3D"false"> <p>Hello</p> </anthem:panel> </div> </form> </body> </html> Web.config ---------- <?xml version=3D"1.0"?> <configuration> <appSettings/> <connectionStrings/> <system.web> <compilation debug=3D"true"></compilation> <authentication mode=3D"Windows"/> </system.web> </configuration> Regards, Kieran Benton Senior Developer Ticketmaster Systems Ltd. (Formerly Synchro Systems Ltd.)=A0=20 48 Leceister Square, London, WC2H 7LR T: +44 (0) 207 022 8558 M: +44 (0) 7980 077345 F: +44 (0) 207 915 0418 E: kie...@ti... =A0 DISCLAIMER: This e-mail is private and confidential and may contain proprietary or legally privileged information. It is for the intended recipient only. If you have received this email in error, please notify = the author by replying to it and then destroy it. If you are not the = intended recipient you must not use, disclose, distribute, copy, print or rely on this e-mail or any attachment. Ticketmaster=A0Systems Limited Registered = in England No. 01433187. Registered Office, 48 Leicester Square, London = WC2H 7LR. -------------------------------------------------------------------------= This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ anthem-dot-net-users mailing list ant...@li... https://lists.sourceforge.net/lists/listinfo/anthem-dot-net-users |