[Mono-list] global.asax.cs not working

Andrey Tkach andriy.tkach at stu-electronics.com
Fri May 5 10:37:41 EDT 2006


Hello,

I faced with issue while porting project from VS2003.

In my sample application global.asax.cs codebehind methods (I’ve tried
Application_Start and Application_BeginRequest) do not execute, but IIS
works proper with this app.
Afrer I moved codebehind code to global.asax (as shown in example) but
also without success.
Then I’ve modified global.asax ()  from test project (see bellow), but
also doesn’t receive any test message to response; 

I’m using mono 1.1.15 with xsp1 under apache2 which runs on the win32
platform. (I use mod_mono.so compiled under win32) 
Can anyone tell me what I'm doing wrong and how to make web application
run global.asax.cs methods?

//globa.asax
http://svn.myrealbox.com/viewcvs/trunk/xsp/test/global.asax?rev=39262&vi
ew=log ===
<script runat="server" language="c#">
	void Application_Start (object o, EventArgs args)
	{
		Console.WriteLine ("Application_Start");
		Response.Write("Application Started");
	}

	void Application_End (object o, EventArgs args)
	{
		Console.WriteLine ("Application_End");
	}

	void Application_BeginRequest (object o, EventArgs args)
	{
//*************
		Response.Write("Request Started"); <<<←
--------------------------Have added this line
//*************

		if (Request.FilePath == "/index.aspx" &&
Environment.Version.Major == 2)
			Response.Redirect ("/index2.aspx");
	}
</script>
//======================================================================
==================

Sincerely yours,
Andriy Tkach





More information about the Mono-list mailing list