* HttpApplication.cs: let the current context known that
MapRequestHandler is done.
* HttpContext.cs: implemented RemapHandler
svn path=/trunk/mcs/; revision=128045
+2009-02-25 Marek Habersack <mhabersack@novell.com>
+
+ * HttpApplication.cs: let the current context known that
+ MapRequestHandler is done.
+
+ * HttpContext.cs: implemented RemapHandler
+
2009-02-24 Marek Habersack <mhabersack@novell.com>
* TempFileStream.cs: the class is internal
if (stop_processing)
yield return true;
+#if NET_2_0
+ context.MapRequestHandlerDone = false;
+#endif
StartTimer ("BeginRequest");
eventHandler = Events [BeginRequestEvent];
if (eventHandler != null) {
foreach (bool stop in RunHooks (eventHandler))
yield return stop;
StopTimer ();
+ context.MapRequestHandlerDone = true;
#endif
StartTimer ("GetHandler");
}
#if NET_2_0
+ internal bool MapRequestHandlerDone {
+ get;
+ set;
+ }
+
// The two properties below are defined only when the IIS7 integrated mode is used.
// They are useless under Mono
public RequestNotification CurrentNotification {
return null;
}
+#if NET_2_0
+ public void RemapHandler (IHttpHandler handler)
+ {
+ if (MapRequestHandlerDone)
+ throw new InvalidOperationException ("The RemapHandler method was called after the MapRequestHandler event occurred.");
+ Handler = handler;
+ }
+#endif
+
public void RewritePath (string path)
{
#if NET_2_0