please suscribe me the cli-user mailing list.

( I tried this 2 weeks ago )
Because I get not response from a developer I try to post the bug again:


There is a problem with page redirect in the Application_BeginRequest in
Global.asas.cs

I have made a couple of tests and found out that apache ( or the
mod_aspdotnet -module)
does not reach the "Application_BeginRequest"-Handler in global.asax if the
page does not exist.
With IIS it even goes into this handler if the Requestet-page has a ".aspx"
-Extension independend if this page exist or not.
So it lookes like IIS calls the Handler in Global.asax.cs  -before-
processing the new page.

try out this code snipped in a test-application (Global.asax.cs)
protected void Application_BeginRequest(Object sender, EventArgs e)
{
      string sPath = Request.Path;
      HttpContext myContext = HttpContext.Current;
      myContext.Response.Output.WriteLine("Path:");
      myContext.Response.Output.WriteLine(sPath);

      string sPath1 = Request.Path.ToLower();
      int ix = sPath1.IndexOf("redir");
      if ( ix > 0 )
      {
        myContext.Response.Redirect("WebForm2.aspx");
      }
}

in a simple demo application make a "Webform1.aspx" with a link to
"redir.aspx" redirected to an existing "Webform2.aspx"
( mail back if you need a complete demo-application. )

this worked fine with IIS  but with Apache (2.0.52) we get the following
error ( in the Browser)

" The requested URL /testpage/redir.aspx was not found on this server. "


 If I call the URL (Webform2.aspx) direct it was shown in the browser.

We try to fix this with "RedirectMatch" in httpd.conf - this works!!
... but the above handler is only a simle example, our real handler has
quite more programatical logic and we could not put this logic into the
apache configuration-file. This is -no- problem with case-sensitive
matching in Apache - we checked this.

I hope someone from the developer-team could help us.


mit freundlichen Grüßen

Reimelt GmbH

i.A. Jürgen Goldmann
Software / Elektronik  (ETS)

Messenhäuser Straße 37-39
D-63322 Rödermark
Tel:+49(0)6074/691-164
Fax:+49(0)6074/691-261
e-mail:[EMAIL PROTECTED]

--------------> wichtiger Hinweis <---------
Aufgrund unseres eingehenden e-mail Filters ist folgende Handhabung bei
Datei-Anhängen nötig.
e-mail Anhänge mit der Datei-Endung: "exe" oder "dll" müssen in die
Datei-Endung "sav" umbenannt und  danach gezippt werden.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to