[Mono-list] Server.Transfer and Response.Redirect crashes XSP on Windows - Take 2

Gabriele Zannoni gzannoni@deis.unibo.it
Wed, 19 Jan 2005 18:18:46 +0100


First of all, I'm sorry for the html in my previous mail: those of you that
receive the list in digest mode know what I mean...

I did some simple tests as suggested from Elfyn.
The test are copied below.

File -- ServerTransferTest.aspx

<%@ Page language="c#" AutoEventWireup="true" Inherits="System.Web.UI.Page"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<script runat="server">
	private void Page_Load(object sender, System.EventArgs e)
		{
			Server.Transfer("ServerTransferred.aspx");
		}
</script>
<html>
  <head>
    <title>ServerTransferTest</title>
  </head>
  <body>
    <form id="Form1" method="post" runat="server">
	Server TO TRANSFER!!!!
     </form>
  </body>
</html>

File -- ServerTransferred.aspx

<%@ Page language="c#" AutoEventWireup="false" Inherits="System.Web.UI.Page"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<html>
  <head>
    <title>ServerTransferred</title>
  </head>
  <body>	
    <form id="Form1" method="post" runat="server">
		Server transferred.
     </form>
  </body>
</html>

Loading from a browser the ServerTransferTest.aspx page causes the XSP to
crash without information. Note that there's no precompilation needed so
it's all "made in mono".

To have further information I activated the --verbose switch (mono
--profile --verbose C:\PROGRA~1\MONO-1~1.5\lib\mono\1.0\xsp.exe --root .
--port 8088 --applications /:. > prof1.txt). I report the rows involved in
the request below:

Method ASP.ServerTransferTest_aspx:.cctor () emitted at 0x06cbda48 to
0x06cbda70 [85f79455]
Method ASP.ServerTransferTest_aspx:.ctor () emitted at 0x06cbda78 to
0x06cbdab6 [85f79455]
Method System.Web.HttpCookie:get_Value () emitted at 0x06cbdab8 to
0x06cbdb08 [85f79455]
Method System.Web.Caching.CacheExpires:Update
(System.Web.Caching.CacheEntry,long) emitted at 0x06cbdb10 to 0x06cbdc41
[85f79455]
Method System.Web.Caching.ExpiresBucket:Remove
(System.Web.Caching.CacheEntry) emitted at 0x06cbdc48 to 0x06cbdddc
[85f79455]
Method System.Web.Caching.CacheEntry:get_ExpiresIndex () emitted at
0x06cbdde0 to 0x06cbde0a [85f79455]
Method Int32Collection:Add (int) emitted at 0x06cbde10 to 0x06cbdeda
[85f79455]
Method Int32Collection:NeedsGrowth () emitted at 0x06cbdee0 to 0x06cbdf30
[85f79455]
Method Int32Collection:get_Capacity () emitted at 0x06cbdf38 to 0x06cbdf65
[85f79455]
Method System.Web.UI.TemplateControl:get_SupportAutoEvents () emitted at
0x06cbdf68 to 0x06cbdf91 [85f79455]
Method System.Web.UI.Control:get_AutoEventWireup () emitted at 0x06cbdf98 to
0x06cbdfd7 [85f79455]
Method ASP.ServerTransferTest_aspx:Page_Load (object,System.EventArgs)
emitted at 0x06cbdfd8 to 0x06cbe01d [85f79455]
Method ASP.ServerTransferTest_aspx:FrameworkInitialize () emitted at
0x06cbe020 to 0x06cbe080 [85f79455]
Method ASP.ServerTransferTest_aspx:__BuildControlTree
(System.Web.UI.Control) emitted at 0x06cbe088 to 0x06cbe151 [85f79455]
Method ASP.ServerTransferTest_aspx:__BuildControl_Form1 () emitted at
0x06cbe158 to 0x06cbe217 [85f79455]
Method System.Web.UI.Page:get_Server () emitted at 0x06cbe218 to 0x06cbe25e
[85f79455]
Method System.Web.HttpServerUtility:Transfer (string) emitted at 0x06cbe260
to 0x06cbe348 [85f79455]
Method System.Web.HttpServerUtility:Transfer (string,bool) emitted at
0x06cbe350 to 0x06cbe3aa [85f79455]
Method System.Web.HttpServerUtility:Execute
(string,System.IO.TextWriter,bool) emitted at 0x06cbe3b0 to 0x06cbe95c
[85f79455]
Method System.Web.HttpRequest:set_QueryStringRaw (string) emitted at
0x06cbe960 to 0x06cbe9a5 [85f79455]
Method System.Web.HttpRequest:SetCurrentExePath (string) emitted at
0x06cbe9a8 to 0x06cbe9f0 [85f79455]
Method (wrapper runtime-invoke) System.Object:runtime_invoke_void
(object,intptr,intptr,intptr) emitted at 0x06cbe9f8 to 0x06cbea89 [85f79455]
Method (wrapper runtime-invoke) System.Object:runtime_invoke_void
(object,intptr,intptr,intptr) emitted at 0x06cbea90 to 0x06cbeb1e [85f79455]
Method ASP.ServerTransferred_aspx:.cctor () emitted at 0x06cbeb20 to
0x06cbeb48 [85f79455]
Method ASP.ServerTransferred_aspx:.ctor () emitted at 0x06cbeb50 to
0x06cbeb8e [85f79455]
Method System.Web.HttpResponse:SetTextWriter (System.IO.TextWriter) emitted
at 0x06cbeb90 to 0x06cbebd1 [85f79455]
Method ASP.ServerTransferred_aspx:get_SupportAutoEvents () emitted at
0x06cbebd8 to 0x06cbec01 [85f79455]
Method ASP.ServerTransferred_aspx:FrameworkInitialize () emitted at
0x06cbec08 to 0x06cbec68 [85f79455]
Method ASP.ServerTransferred_aspx:__BuildControlTree (System.Web.UI.Control)
emitted at 0x06cbec70 to 0x06cbed39 [85f79455]
Method ASP.ServerTransferred_aspx:__BuildControl_Form1 () emitted at
0x06cbed40 to 0x06cbedff [85f79455]
Method System.Web.UI.Control:get_EnableViewState () emitted at 0x06cbee00 to
0x06cbee3f [85f79455]
Method System.Web.UI.Control:SaveViewState () emitted at 0x06cbee40 to
0x06cbeedd [85f79455]
Method System.Web.UI.StateBag:SaveViewState () emitted at 0x06cbeee0 to
0x06cbf1ac [85f79455]
Method System.Collections.Specialized.HybridDictionary:get_Count () emitted
at 0x06cbf1b0 to 0x06cbf204 [85f79455]
Method ListEntryCollectionEnumerator:get_Current () emitted at 0x06cbf208 to
0x06cbf291 [85f79455]
Method System.Web.UI.StateItem:get_IsDirty () emitted at 0x06cbf298 to
0x06cbf2c3 [85f79455]
Method System.Web.Util.UrlUtils:MakeRelative (string,string) emitted at
0x06cbf2c8 to 0x06cbf3f9 [85f79455]
Method System.Web.HttpResponse:End () emitted at 0x06cbf400 to 0x06cbf4af
[85f79455]
Method System.Web.HttpContext:get_TimeoutPossible () emitted at 0x06cbf4b0
to 0x06cbf4fc [85f79455]
Method System.Web.StepCompleteRequest:.ctor () emitted at 0x06cbf500 to
0x06cbf52a [85f79455]
Method System.Threading.Thread:Abort (object) emitted at 0x06cbf530 to
0x06cbf561 [85f79455]
Method (wrapper managed-to-native) System.Threading.Thread:Abort_internal
(object) emitted at 0x06cbf568 to 0x06cbf5c4 [85f79455]
Method System.Web.HttpResponse:Flush () emitted at 0x06cbf5c8 to 0x06cbf632
[85f79455]
Method System.Web.HttpRequest:get_ServerVariables () emitted at 0x06cbf638
to 0x06cbf66e [85f79455]
Method System.Web.HttpRequest:ParseServerVariables () emitted at 0x06cbf670
to 0x06cbf6df [85f79455]
Method System.Web.ServerVariablesCollection:.ctor (System.Web.HttpRequest)
emitted at 0x06cbf6e0 to 0x06cbf71a [85f79455]
Method System.Web.ServerVariablesCollection:Get (string) emitted at
0x06cbf720 to 0x06cbf794 [85f79455]
Method System.Web.ServerVariablesCollection:GetServerVar (string) emitted at
0x06cbf798 to 0x06cbfc27 [85f79455]
Method System.Web.HttpRequest:get_WorkerRequest () emitted at 0x06cbfc28 to
0x06cbfc52 [85f79455]
Method Mono.ASPNET.XSPWorkerRequest:GetHttpVersion () emitted at 0x06cbfc58
to 0x06cbfc82 [85f79455]
Method System.Web.HttpResponse:AppendHeader (int,string) emitted at
0x06cbfc88 to 0x06cbfdbf [85f79455]
Method (wrapper remoting-invoke-with-check)
Mono.ASPNET.BaseRequestBroker:Flush (int) emitted at 0x06cbfe30 to
0x06cbfea5 [85f79455]
Method (wrapper remoting-invoke) Mono.ASPNET.BaseRequestBroker:Flush (int)
emitted at 0x06cbfea8 to 0x06cbff2a [85f79455]
Method Mono.ASPNET.BaseRequestBroker:Flush (int) emitted at 0x016d0510 to
0x016d0568 [xsp.exe]
Method Mono.ASPNET.XSPWorker:Flush () emitted at 0x016d0570 to 0x016d059e
[xsp.exe]
Method System.Net.Sockets.NetworkStream:Flush () emitted at 0x016d05a0 to
0x016d05c2 [xsp.exe]
Method System.Web.HttpApplication:CompleteRequest () emitted at 0x06cbff30
to 0x06cbff59 [85f79455]
Method System.NullReferenceException:.ctor () emitted at 0x016d05c8 to
0x016d061c [xsp.exe]

The last row tells that a NullReferenceException is thrown but not why.

I run mono 1.0.5 on WinXP.
Is there someone that have an idea of what is wrong?

Thanks,
	Gabriele

PS: Sorry for the long text copied...