[Mono-list] mod_mono config help

Reno Romanin reno@hardcoretek.com
Thu, 9 Sep 2004 23:18:49 -0500


OK, posted once before on this and got too busy to follow up, so here's
the problem...

Mod-mono-server is running asp pages fine... but this one is giving me
problems. It's a simple search of a flat DB for matching results...
Keep in mind, I didn't write the site, and I am passing this along to
the guy who did... I'm no coder, just trying to host the site...

TIA for any input

Here is the error:

Description: Error processing request. 
Error Message: HTTP 500. 

Stack Trace: System.InvalidCastException: Cannot cast from source type
to destination type.
in <0x00037> System.Web.UI.WebControls.WebControl:LoadViewState (object)
in <0x00022> System.Web.UI.WebControls.Label:LoadViewState (object)
in <0x00093> System.Web.UI.Control:LoadViewStateRecursive (object)
in <0x001b4> System.Web.UI.Control:LoadViewStateRecursive (object)
in <0x001b4> System.Web.UI.Control:LoadViewStateRecursive (object)
in <0x0005b> System.Web.UI.Page:LoadPageViewState ()
in <0x000f1> System.Web.UI.Page:InternalProcessRequest ()
in <0x000c2> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
in <0x00359> System.Web.HttpServerUtility:Execute
(string,System.IO.TextWriter,bool)
in <0x000bb> System.Web.HttpServerUtility:Transfer (string,bool)
in <0x00016> System.Web.HttpServerUtility:Transfer (string)
in <0x00020> tickethog.pageDefault:btnSearch_Click
(object,System.EventArgs)
in <0x00069> (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_object_EventArgs
(object,System.EventArgs)
in <0x0009e> System.Web.UI.WebControls.Button:OnClick (System.EventArgs)
in <0x00058>
System.Web.UI.WebControls.Button:System.Web.UI.IPostBackEventHandler.Rai
sePostBackEvent (string)
in <0x00016> System.Web.UI.Page:RaisePostBackEvent
(System.Web.UI.IPostBackEventHandler,string)
in <0x0003e> System.Web.UI.Page:RaisePostBackEvents ()
in <0x002c3> System.Web.UI.Page:InternalProcessRequest ()
in <0x000c2> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
in <0x002eb> ExecuteHandlerState:Execute ()
in <0x00084> StateMachine:ExecuteState
(System.Web.HttpApplication/IStateHandler,bool&)

 Here is the code doing it:

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace tickethog
{
	
	/// <summary>
	/// Default page for www.tickethog.com
	/// </summary>
	public class pageDefault : System.Web.UI.Page
	{
		protected System.Web.UI.WebControls.ListBox LBGames;
		protected System.Web.UI.WebControls.Button btnSearch;
		protected System.Web.UI.HtmlControls.HtmlForm Form1;
	
		// Custom property of pageDefault used to hold the
selected value of LBGame listbox
		public string Game
		{
			get
			{
				return LBGames.SelectedValue;
			}
		}

		
		private void Page_Load(object sender, System.EventArgs
e)
		{
			// Put user code to initialize the page here
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET
Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.btnSearch.Click += new
System.EventHandler(this.btnSearch_Click);
			this.Load += new
System.EventHandler(this.Page_Load);

		}
		#endregion

		private void btnSearch_Click(object sender,
System.EventArgs e)
		{
			Server.Transfer("ticketlist.aspx");
		}
	}
}