Index :: My server won't transfer
[Article No. 20 @ 2007-11-06]
Yesterday I have wasted many hours trying to understand why my ASP.NET 2.0 application
(developed on Windows with MS Visual Studio .NET 2005) won't run on Apache/mono.
The main problem was on the communication between aspx pages in order to save data into the database.
It seems that something was wrong when a page transfers its content to another page using the Server.Transfer
method.
Reading the online documentation of the
System.Web.HttpServerUtility.Transfer method (usually written as Server.Transfer) I've discovered the following
overloads methods:
Transfer(string)
Documentation for this section has not yet been entered.
Transfer(string, bool)
Documentation for this section has not yet been entered.
Yes, there's an overloaded method using 2 parameters, but what about the second parameter ?
The Mono online doc is not complete, so I've looking for further information directly to
the Microsoft MSDN and finally
here I've found the solution: in the function prototype the second parameter is named
preserveForm.
Using the overloaded version of the method:
public void Transfer (
string path,
bool preserveForm
)
my application now runs.
The strange thing is that in the one-parameter method
public void Transfer (
string path
)
the assumption for the second parameter is
true, but I've discovered that for my application
this is not true, so in my asp.net 2.0 application the following:
Server.Transfer("/Services/savedata.aspx");
and
Server.Transfer("/Services/savedata.aspx", true);
are different.
In the first case the method transfer the flow to the destination page but many form items are lost. In
the second case all my data are transferred from the source page to the target page.
Available commets
Author: nathan
Thanks for posting this...I had exactly the same problem....on mono release 1.2.5